Dmitry Panov 5 éve
szülő
commit
76b747147f
1 módosított fájl, 3 hozzáadás és 0 törlés
  1. 3 0
      parser/lexer.go

+ 3 - 0
parser/lexer.go

@@ -3,6 +3,7 @@ package parser
 import (
 	"errors"
 	"fmt"
+	"regexp"
 	"strconv"
 	"strings"
 	"unicode"
@@ -14,6 +15,8 @@ import (
 	"github.com/dop251/goja/unistring"
 )
 
+var matchIdentifier = regexp.MustCompile(`^[$_\p{L}][$_\p{L}\d}]*$`)
+
 func isDecimalDigit(chr rune) bool {
 	return '0' <= chr && chr <= '9'
 }