Initial batch of AST matchers. (#953)

Also fixes an issue where llvm casts wouldn't work on AstNode.
This commit is contained in:
Geoff Romer
2021-11-23 12:34:55 -08:00
committed by GitHub
parent ec2f8e64e2
commit 6ae85bd13a
10 changed files with 733 additions and 23 deletions
+3
View File
@@ -93,6 +93,9 @@ enum class Operator {
Ptr,
};
// Returns the lexical representation of `op`, such as "+" for `Add`.
auto ToString(Operator op) -> std::string_view;
class IdentifierExpression : public Expression {
public:
explicit IdentifierExpression(SourceLocation source_loc, std::string name)