Commit graph

14 commits

Author SHA1 Message Date
Max Brunsfeld
d032114d7a js grammar - recover from errors on semicolons but not line-breaks 2015-09-22 21:12:28 -07:00
Max Brunsfeld
4b270c8604 Use 2-space indent in example grammars 2015-09-03 18:01:30 -07:00
Max Brunsfeld
bd77ab1ac9 Move public rule functions out of rule namespace
This way, there's only one public namespace: tree_sitter
2015-09-03 17:49:20 -07:00
Max Brunsfeld
acf9280eda Make expression and statement rules hidden in javascript grammar 2015-09-02 13:05:54 -07:00
Max Brunsfeld
b1f8ba6202 Replace {left,right}_assoc w/ prec, with an associativity argument 2015-03-23 21:06:31 -07:00
Max Brunsfeld
a19b0e75ac 🔥 keyword and keypattern functions
Just make strings have higher precedence than regexps.
2015-03-22 16:00:26 -07:00
Max Brunsfeld
80ec303b10 Replace prec rule w/ left_assoc and right_assoc
Consider shift/reduce conflicts to be compilation errors unless
they are resolved by a specified associativity.
2015-03-16 23:12:34 -07:00
Max Brunsfeld
9a198562e0 Treat parse conflicts as errors in grammar compilation
For now, only reduce/reduce conflicts w/ no tie-breaking precedence
are treated as errors. The rest are dropped, because shift/reduce
conflicts are currently very common because we don't have a way
of specifying associativity along w/ precedence.
2015-03-15 20:31:41 -07:00
Max Brunsfeld
8a03bd8978 Comment out some parts of JS grammar to speed up tests 2014-10-21 09:01:56 -07:00
Max Brunsfeld
91cf35b72c Rework javascript fixture grammar 2014-10-21 08:49:16 -07:00
Max Brunsfeld
22ee68e1a9 Make node for each var assignment in JS grammar 2014-10-15 15:04:57 -07:00
Max Brunsfeld
8c3ea6ef30 In JS grammar, don't include enclosing parens in formal_parameters node 2014-10-10 17:11:14 -07:00
Max Brunsfeld
13ba35e26f Fix indentation in fixture grammars 2014-09-27 16:10:30 -07:00
Max Brunsfeld
9682ef6c79 Rename examples directory to spec/fixtures
- I want to move away from having complete grammars for real languages
  (e.g. javascript, golang) in this repo. These languages take a long
  time to compile, and they now exist in their own repos
  (node-tree-sitter-javascript etc).
- I want to start testing more compiler edge cases through integration
  tests, so I want to put more small, weird grammars in here. That makes
  me not want to call the directory `examples`.
2014-09-10 13:31:06 -07:00
Renamed from examples/grammars/javascript.cc (Browse further)