mirror of
https://github.com/danog/liquid.git
synced 2024-11-27 03:34:44 +01:00
.gitignore | ||
chunk_ast.go | ||
chunk_parser_test.go | ||
chunk_parser.go | ||
chunk_scanner.go | ||
chunktype_string.go | ||
control_tags.go | ||
evaluator_test.go | ||
evaluator.go | ||
expression_parser_test.go | ||
expression_parser.y | ||
README.md | ||
render.go | ||
scanner.go | ||
scanner.rl | ||
tokens.go | ||
y.go |
Go Liquid Template Parser
goliquid
is a Go implementation of the Shopify Liquid template language, for use in Gojekyll.
Status
- Basics
- Constants
- Variables
- Operators
- Arrays
- Whitespace Control
- Tags
- Comment
- Control Flow
- if/else/elsif
- unless
- case/when
- Iteration - [ ] for - [ ] limit, offset, range, reversed - [ ] break, continue - [ ] loop variables - [ ] tablerow - [ ] cycle
- Raw
- Variable
- Assign
- Capture
- Filters
Install
go get -u github.com/osteele/goliquid
Contribute
Setup
go get golang.org/x/tools/cmd/stringer
go install golang.org/x/tools/cmd/goyacc
Install Ragel. On macOS: brew install ragel
.
Workflow
go generate
go test
Test just the scanner:
ragel -Z scanner.rl && go test -run TestExpressionParser
Attribution
Michael Hamrah's Lexing with Ragel and Parsing with Yacc using Go was essential to understanding go yacc
.
License
MIT License