forked from GitHub/gf-core
JS.cf : Changed the JS grammar to support strings as property names in objects. Changed pretty much all the files in the same folder as well as GFCCToJS.hs and SISR.hs to reflect the changes.
This commit is contained in:
@@ -188,7 +188,7 @@ Expr12 : Expr13 { $1 }
|
||||
|
||||
|
||||
Property :: { Property }
|
||||
Property : Ident ':' Expr { Prop $1 $3 }
|
||||
Property : PropertyName ':' Expr { Prop $1 $3 }
|
||||
|
||||
|
||||
ListProperty :: { [Property] }
|
||||
@@ -197,6 +197,11 @@ ListProperty : {- empty -} { [] }
|
||||
| Property ',' ListProperty { (:) $1 $3 }
|
||||
|
||||
|
||||
PropertyName :: { PropertyName }
|
||||
PropertyName : Ident { IdentPropName $1 }
|
||||
| String { StringPropName $1 }
|
||||
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user