Add rule precedence construct

Still need to add some way of expressing left and right
associativity
This commit is contained in:
Max Brunsfeld 2014-04-14 23:11:10 -07:00
parent e23604ac52
commit a437d39773
23 changed files with 750 additions and 1504 deletions

View file

@ -4,7 +4,7 @@
#include <utility>
#include <vector>
#include "compiler/generate_code/c_code.h"
#include "compiler/generate_code/helpers.h"
#include "compiler/util/string_helpers.h"
#include "compiler/rules/built_in_symbols.h"
namespace tree_sitter {
@ -14,6 +14,9 @@ namespace tree_sitter {
using std::vector;
using std::set;
using std::pair;
using util::join;
using util::indent;
using util::character_code;
namespace generate_code {
string _switch(string condition, string body) {