Compute transitions correctly for long sequences
This commit is contained in:
parent
95d955e779
commit
061d8a8efc
4 changed files with 36 additions and 13 deletions
10
src/rules.h
10
src/rules.h
|
|
@ -15,6 +15,8 @@ namespace tree_sitter {
|
|||
virtual std::string to_string() const = 0;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<const Rule> rule_ptr;
|
||||
|
||||
class Blank : public Rule {
|
||||
public:
|
||||
Blank();
|
||||
|
|
@ -45,8 +47,8 @@ namespace tree_sitter {
|
|||
bool operator==(const Rule& other) const;
|
||||
std::string to_string() const;
|
||||
private:
|
||||
std::shared_ptr<const Rule> left;
|
||||
std::shared_ptr<const Rule> right;
|
||||
rule_ptr left;
|
||||
rule_ptr right;
|
||||
};
|
||||
|
||||
class Seq : public Rule {
|
||||
|
|
@ -59,8 +61,8 @@ namespace tree_sitter {
|
|||
bool operator==(const Rule& other) const;
|
||||
std::string to_string() const;
|
||||
private:
|
||||
std::shared_ptr<const Rule> left;
|
||||
std::shared_ptr<const Rule> right;
|
||||
rule_ptr left;
|
||||
rule_ptr right;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue