Explorar el Código

parser: Fix loose 'selector' definition.

Herbert Vojčík hace 7 años
padre
commit
cdde6f7229
Se han modificado 2 ficheros con 224 adiciones y 265 borrados
  1. 223 263
      support/parser.js
  2. 1 2
      support/parser.pegjs

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 223 - 263
support/parser.js


+ 1 - 2
support/parser.pegjs

@@ -6,7 +6,6 @@ ws             = (separator / comments)*
 maybeDotsWs = ("." / separator / comments)*
 identifier     = first:[a-zA-Z] others:[a-zA-Z0-9]* {return first + others.join("");}
 keyword        = first:identifier last:":" {return first + last;}
-selector      = first:[a-zA-Z] others:[a-zA-Z0-9\:]* {return first + others.join("");}
 className      = first:[A-Z] others:[a-zA-Z0-9]* {return first + others.join("");}
 string         = "'" val:(("''" {return "'";} / [^'])*) "'" {
                      return $globals.ValueNode._new()
@@ -22,7 +21,7 @@ character      = "$" char:.
                              ._value_(char);
                   }
 symbol         = "#" rest:bareSymbol {return rest;}
-bareSymbol         = val:(selector / binarySelector / node:string {return node._value();})
+bareSymbol         = val:(keywords:keyword+ {return keywords.join("");} / binarySelector / unarySelector / node:string {return node._value();})
                   {
                       return $globals.ValueNode._new()
                              ._location_(location())

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio