Sha256: 6ecd90ac2e43cf0b52b6bd52a54cbe3046d0e9db411787ae0c3dbc8db6d535e8

Contents?: true

Size: 535 Bytes

Versions: 8

Compression:

Stored size: 535 Bytes

Contents

module Slate
  grammar SlateTree
    rule document
      (target / space)*
    end

    rule target
      space? string space '{' space? function* space? '}' <Target>
    end

    rule function
      token space? (target / argument)* <Function>
    end

    rule argument
      (string / integer) ','? space? <Argument>
    end

    rule token
      [a-zA-Z]+ <Token>
    end

    rule string
      '"' ('\"' / !'"' .)* '"' <String>
    end

    rule integer
      [\d]+ <Integer>
    end

    rule space
      [\s]+
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
slate-1.1.2 lib/slate/parser/slate_tree.treetop
slate-1.1.1 lib/slate/parser/slate_tree.treetop
slate-1.1.0 lib/slate/parser/slate_tree.treetop
slate-1.0.3 lib/slate/parser/slate_tree.treetop
slate-1.0.2 lib/slate/parser/slate_tree.treetop
slate-1.0.1 lib/slate/parser/slate_tree.treetop
slate-1.0.0 lib/slate/parser/slate_tree.treetop
slate-0.2.1 lib/slate/parser/slate_tree.treetop