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 authored and GitHub committed 2021-11-23 12:34:55 -08:00
1 parent ec2f8e64e2
commit 6ae85bd13a
10 files changed
+733 -23

No files matched your search

+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)