File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 2424 "@inject?" : paramData ,
2525 "@state" : paramData ,
2626 "template" : { soyState : "templ-def" , variableScope : true } ,
27+ "extern" : { soyState : "param-def" } ,
28+ "export" : { soyState : "param-def" } ,
2729 "literal" : { } ,
2830 "msg" : { } ,
2931 "fallbackmsg" : { noEndTag : true , reduceIndent : true } ,
283285 return "type" ;
284286 }
285287 if ( match = stream . match ( / ^ \w + / ) ) {
288+ if ( match [ 0 ] == 'extern' ) {
289+ return 'keyword' ;
290+ }
286291 state . variables = prepend ( state . variables , match [ 0 ] ) ;
287292 state . soyState . pop ( ) ;
288293 state . soyState . push ( "param-type" ) ;
553558 state . context = new Context ( state . context , state . tag , tag . variableScope ? state . variables : null ) ;
554559 // Otherwise close the current context.
555560 } else if ( endTag ) {
556- if ( ! state . context || state . context . tag != tagName ) {
561+ var isBalancedForExtern = tagName == 'extern' && ( state . context && state . context . tag == 'export' ) ;
562+ if ( ! state . context || ( ( state . context . tag != tagName ) && ! isBalancedForExtern ) ) {
557563 tagError = true ;
558564 } else if ( state . context ) {
559565 if ( state . context . kind ) {
Original file line number Diff line number Diff line change 311311
312312 MT ( 'velog' ,
313313 '[keyword {velog] [variable-2&error $data][keyword }] Logged [keyword {/velog}]' ) ;
314+
315+ MT ( 'extern' , '[keyword {extern] [def renderer]: ([def s]:[type string])=>[type string][keyword }] [keyword {/extern}]' ) ;
316+
317+ MT ( 'export extern' , '[keyword {export] [keyword extern] [def renderer]: ([def s]:[type string])=>[type string][keyword }] [keyword {/extern}]' ) ;
314318} ) ( ) ;
You can’t perform that action at this time.
0 commit comments