Add helper functions for making shared pointers to rules
- start work on item set class
This commit is contained in:
parent
ec8b7ccf20
commit
11e3980319
33 changed files with 486 additions and 150 deletions
21
src/rules/Pattern.cpp
Normal file
21
src/rules/Pattern.cpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include "Pattern.h"
|
||||
#include "transition_map.h"
|
||||
|
||||
namespace tree_sitter {
|
||||
namespace rules {
|
||||
Pattern::Pattern(const std::string &string) : value(string) {};
|
||||
Pattern::Pattern(const char *string) : value(string) {};
|
||||
|
||||
TransitionMap<Rule> Pattern::transitions() const {
|
||||
return tree_sitter::TransitionMap<Rule>();
|
||||
}
|
||||
|
||||
bool Pattern::operator ==(tree_sitter::rules::Rule const &other) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string Pattern::to_string() const {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue