Adding tests for CharsetEscape nodes

This commit is contained in:
Jeff Avallone
2014-12-19 21:56:56 -05:00
parent 24e21834f6
commit d27831a265
2 changed files with 38 additions and 1 deletions
+3 -1
View File
@@ -22,9 +22,11 @@ grammar JavascriptRegexp
/ charset_literal <Literal>
charset_escape <- "\\" esc:(
code:[bdDfnrsStvwW] arg:""?
/ code:"c" arg:.
/ code:"0" arg:[0-7]+
/ code:"x" arg:( [0-9a-fA-F] [0-9a-fA-F] )
/ code:"u" arg:( [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] ) )
/ code:"u" arg:( [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] )
/ code:"0" arg:""? )
charset_literal <- ( ""? literal:[^\\\]] ) / ( "\\" literal:. )
terminal <- "." <AnyCharacter>
/ escape <Escape>