From 314f147bff04c3b02e0f43b77e4b7a3f1fd9e433 Mon Sep 17 00:00:00 2001 From: meza Date: Tue, 29 Apr 2008 13:05:24 +0000 Subject: 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. --- src/GF/JavaScript/ParJS.y | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/GF/JavaScript/ParJS.y') diff --git a/src/GF/JavaScript/ParJS.y b/src/GF/JavaScript/ParJS.y index bbbb959e5..bf0614757 100644 --- a/src/GF/JavaScript/ParJS.y +++ b/src/GF/JavaScript/ParJS.y @@ -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 } + + { -- cgit v1.2.3