Sha256: 41a84abe26be51d7cdd7430887c23a4598b6324fbdc0181da7029a9f3eb88cfd

Contents?: true

Size: 673 Bytes

Versions: 1

Compression:

Stored size: 673 Bytes

Contents

#ifndef COMPILER_LEXICAL_GRAMMAR_H_
#define COMPILER_LEXICAL_GRAMMAR_H_

#include <vector>
#include <string>
#include <set>
#include "compiler/rule.h"
#include "compiler/grammar.h"

namespace tree_sitter {

struct LexicalVariable {
  std::string name;
  VariableType type;
  rules::Rule rule;
  bool is_string;

  inline bool operator==(const LexicalVariable &other) const {
    return other.name == name && other.type == type && other.rule == rule &&
      other.is_string == is_string;
  }
};

struct LexicalGrammar {
  std::vector<LexicalVariable> variables;
  std::vector<rules::Rule> separators;
};

}  // namespace tree_sitter

#endif  // COMPILER_LEXICAL_GRAMMAR_H_

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tree-sitter-0.1.0 ext/tree-sitter/tree-sitter/src/compiler/lexical_grammar.h