Sha256: e2d23e395f7ad3f211bdb05400e561b5349da54416f0b03fb5a2ffc1e278def3

Contents?: true

Size: 1.46 KB

Versions: 4

Compression:

Stored size: 1.46 KB

Contents

%x mu

%%

[^\x00]*?/("{{")                 { this.begin("mu"); if (yytext) return 'CONTENT'; }
[^\x00]+                         { return 'CONTENT'; }

<mu>"{{>"                    { return 'OPEN_PARTIAL'; }
<mu>"{{#"                    { return 'OPEN_BLOCK'; }
<mu>"{{/"                    { return 'OPEN_ENDBLOCK'; }
<mu>"{{^"                    { return 'OPEN_INVERSE'; }
<mu>"{{"\s*"else"            { return 'OPEN_INVERSE'; }
<mu>"{{{"                    { return 'OPEN_UNESCAPED'; }
<mu>"{{&"                    { return 'OPEN_UNESCAPED'; }
<mu>"{{!"[\s\S]*?"}}"        { yytext = yytext.substr(3,yyleng-5); this.begin("INITIAL"); return 'COMMENT'; }
<mu>"{{"                     { return 'OPEN'; }

<mu>"="                      { return 'EQUALS'; }
<mu>"."/[} ]                 { return 'ID'; }
<mu>".."                     { return 'ID'; }
<mu>[/.]                     { return 'SEP'; }
<mu>\s+                      { /*ignore whitespace*/ }
<mu>"}}}"                    { this.begin("INITIAL"); return 'CLOSE'; }
<mu>"}}"                     { this.begin("INITIAL"); return 'CLOSE'; }
<mu>'"'("\\"["]|[^"])*'"'    { yytext = yytext.substr(1,yyleng-2).replace(/\\"/g,'"'); return 'STRING'; }
<mu>"true"/[}\s]             { return 'BOOLEAN'; }
<mu>"false"/[}\s]            { return 'BOOLEAN'; }
<mu>[0-9]+/[}\s]             { return 'INTEGER'; }
<mu>[a-zA-Z0-9_$-]+/[=}\s/.] { return 'ID'; }
<mu>.                        { return 'INVALID'; }

<INITIAL,mu><<EOF>>          { return 'EOF'; }

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
hbs_plus-0.1.3 js/src/handlebars.l
hbs-0.1.2 js/src/handlebars.l
hbs-0.1.1 js/src/handlebars.l
hbs-0.1.0 js/src/handlebars.l