Migrate Declaration to newer property style, class-ify ClassDefinition (#859)

This commit is contained in:
Jon Meow
2021-09-29 14:38:18 -07:00
committed by GitHub
parent 25dce9fbcf
commit d157d96338
11 changed files with 127 additions and 115 deletions
+3 -3
View File
@@ -39,7 +39,7 @@ class Pattern {
// Returns the enumerator corresponding to the most-derived type of this
// object.
auto Tag() const -> Kind { return tag; }
auto Tag() const -> Kind { return kind; }
auto SourceLoc() const -> SourceLocation { return loc; }
@@ -50,10 +50,10 @@ class Pattern {
// Constructs a Pattern representing syntax at the given line number.
// `tag` must be the enumerator corresponding to the most-derived type being
// constructed.
Pattern(Kind tag, SourceLocation loc) : tag(tag), loc(loc) {}
Pattern(Kind kind, SourceLocation loc) : kind(kind), loc(loc) {}
private:
const Kind tag;
const Kind kind;
SourceLocation loc;
};