File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 2121 "@inject" : paramData ,
2222 "@inject?" : paramData ,
2323 "@state" : paramData ,
24- "@state?" : paramData ,
2524 "template" : { soyState : "templ-def" , variableScope : true } ,
2625 "literal" : { } ,
2726 "msg" : { } ,
250249 return null ;
251250
252251 case "param-type" :
253- if ( stream . peek ( ) == "}" ) {
252+ var peekChar = stream . peek ( ) ;
253+ if ( peekChar == "}" || peekChar == "=" ) {
254254 state . soyState . pop ( ) ;
255255 return null ;
256256 }
Original file line number Diff line number Diff line change 151151 '[keyword {/template}]' ,
152152 '' ) ;
153153
154+ MT ( 'param-type-and-default-value' ,
155+ '[keyword {template] [def .foo][keyword }]' ,
156+ ' [keyword {@param] [def bar]: [type bool] = [atom true][keyword }]' ,
157+ '[keyword {/template}]' ,
158+ '' ) ;
159+
160+ MT ( 'state-variable-reference' ,
161+ '[keyword {template] [def .foo][keyword }]' ,
162+ ' [keyword {@param] [def bar]:= [atom true][keyword }]' ,
163+ ' [keyword {@state] [def foobar]:= [variable-2 $bar][keyword }]' ,
164+ '[keyword {/template}]' ,
165+ '' ) ;
166+
154167 MT ( 'single-quote-strings' ,
155168 '[keyword {][string "foo"] [string \'bar\'][keyword }]' ,
156169 '' ) ;
You can’t perform that action at this time.
0 commit comments