1
0
forked from GitHub/gf-core

Meta variables are now treated as functions with name ? in SISR, VoiceXML and JavaScript linearization. VoiceXML now returns the partial result when update() is false.

This commit is contained in:
bringert
2006-12-21 16:48:46 +00:00
parent 51df5b8a8d
commit a335b29c0a
11 changed files with 178 additions and 88 deletions

View File

@@ -24,6 +24,7 @@ import GF.JavaScript.ErrM
'.' { PT _ (TS ".") }
'[' { PT _ (TS "[") }
']' { PT _ (TS "]") }
':' { PT _ (TS ":") }
'false' { PT _ (TS "false") }
'function' { PT _ (TS "function") }
'new' { PT _ (TS "new") }
@@ -81,7 +82,7 @@ ListStmt : {- empty -} { [] }
DeclOrExpr :: { DeclOrExpr }
DeclOrExpr : 'var' ListDeclVar { Decl $2 }
| Expr { DExpr $1 }
| Expr1 { DExpr $1 }
DeclVar :: { DeclVar }
@@ -123,6 +124,7 @@ Expr16 : Ident { EVar $1 }
| 'this' { EThis }
| 'function' '(' ListIdent ')' '{' ListStmt '}' { EFun $3 (reverse $6) }
| '[' ListExpr ']' { EArray $2 }
| '{' ListProperty '}' { EObj $2 }
| '(' Expr ',' ListExpr ')' { eseq1_ $2 $4 }
| '(' Expr ')' { $2 }
@@ -185,6 +187,16 @@ Expr12 :: { Expr }
Expr12 : Expr13 { $1 }
Property :: { Property }
Property : Ident ':' Expr { Prop $1 $3 }
ListProperty :: { [Property] }
ListProperty : {- empty -} { [] }
| Property { (:[]) $1 }
| Property ',' ListProperty { (:) $1 $3 }
{