|
@@ -194,11 +194,10 @@ export function isKeyword (text) {
|
|
|
|
|
|
export function isValidIdentifier (identifier_str) {
|
|
export function isValidIdentifier (identifier_str) {
|
|
const validRegex = /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(identifier_str);
|
|
const validRegex = /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(identifier_str);
|
|
- return validRegex;
|
|
|
|
- // if (!validRegex) {
|
|
|
|
- // return false;
|
|
|
|
- // }
|
|
|
|
- // return !isKeyword(identifier_str);
|
|
|
|
|
|
+ if (!validRegex) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ return !isKeyword(identifier_str);
|
|
}
|
|
}
|
|
|
|
|
|
export function getCodeEditorModeConfig () {
|
|
export function getCodeEditorModeConfig () {
|