Selaa lähdekoodia

parser: Fix loose 'selector' definition.

Herbert Vojčík 7 vuotta sitten
vanhempi
commit
cdde6f7229
2 muutettua tiedostoa jossa 224 lisäystä ja 265 poistoa
  1. 223 263
      support/parser.js
  2. 1 2
      support/parser.pegjs

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 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())

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä