-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from AjayBrahmakshatriya/master
Add support for nd_vars and Merge pattern matchers
- Loading branch information
Showing
20 changed files
with
1,568 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef BLOCKS_MATCHERS_H | ||
#define BLOCKS_MATCHERS_H | ||
#include "blocks/matchers/patterns.h" | ||
#include "blocks/block.h" | ||
#include <map> | ||
|
||
namespace block { | ||
namespace matcher { | ||
|
||
struct match { | ||
block::Ptr node; | ||
std::map<std::string, block::Ptr> captures; | ||
}; | ||
|
||
std::vector<match> find_all_matches(std::shared_ptr<pattern> p, block::Ptr node); | ||
bool check_match(std::shared_ptr<pattern> p, block::Ptr node, std::map<std::string, block::Ptr>& captures); | ||
|
||
} | ||
} | ||
|
||
|
||
#endif |
Oops, something went wrong.