1
0
mirror of https://github.com/danog/liquid.git synced 2024-11-27 03:24:39 +01:00
Go to file
2017-06-27 17:43:35 -04:00
chunks Unconfuse unless/endunless 2017-06-27 17:43:35 -04:00
errors Lint 2017-06-27 13:36:38 -04:00
expressions Add reverse filter; improve generics 2017-06-27 17:29:50 -04:00
filters Add reverse filter; improve generics 2017-06-27 17:29:50 -04:00
generics Add reverse filter; improve generics 2017-06-27 17:29:50 -04:00
tags Unconfuse unless/endunless 2017-06-27 17:43:35 -04:00
.gitignore Yacc expression parsing 2017-06-25 16:21:31 -04:00
.travis.yml Add a Travis file 2017-06-26 10:16:02 -04:00
engine.go Implement filters: default; date (w/out format) 2017-06-27 16:02:05 -04:00
LICENSE Create LICENSE 2017-06-26 15:36:29 -04:00
liquid_test.go Move tags to own package 2017-06-27 11:39:32 -04:00
Makefile Lint 2017-06-27 13:36:38 -04:00
README.md Implement raw tag 2017-06-27 17:40:15 -04:00
template.go Add public DefineTag 2017-06-27 07:43:42 -04:00

Go Liquid Template Parser

goliquid is a very early-stage Go implementation of the Shopify Liquid template language, for use in Gojekyll.

Status

Build Status Go Report Card

  • Basics
    • Literals
      • String Escapes
    • Variables
    • Operators
    • Arrays
    • Whitespace Control
  • Tags
    • Comment
    • Control Flow
      • if/else/elsif
      • unless
      • case/when
    • Iteration - [x] for - [ ] limit - [ ] offset - [ ] range - [x] reversed - [ ] break, continue - [ ] loop variables - [ ] tablerow - [ ] cycle
    • Raw
    • Variable
      • Assign
      • Capture
  • Filters
    • some
    • all

Install

go get -u github.com/osteele/goliquid

Contribute

Setup

make setup

Install Ragel. On macOS: brew install ragel.

Workflow

go generate ./...
go test ./...

Test just the scanner:

cd expressions
ragel -Z scanner.rl && go test

Attribution

Michael Hamrah's Lexing with Ragel and Parsing with Yacc using Go was essential to understanding go yacc.

License

MIT License