1
0
mirror of https://github.com/danog/liquid.git synced 2025-01-23 02:11:16 +01:00
liquid/expression_parser.y
2017-06-25 20:20:58 -04:00

18 lines
244 B
Plaintext

%{
package main
import (
_ "fmt"
)
%}
%union {
name string
val func(Context) interface{}
}
%type <val> expr
%token <val> LITERAL IDENTIFIER
%token <name> RELATION
%%
top: expr { yylex.(*lexer).val = $1 };
expr: LITERAL | IDENTIFIER;