-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 #53 from github/user-facing
Add some user-facing AST classes
- Loading branch information
Showing
45 changed files
with
2,637 additions
and
2,036 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,31 @@ | ||
import codeql.Locations | ||
import codeql_ruby.ast.Method | ||
import codeql_ruby.ast.Parameter | ||
import codeql_ruby.ast.Pattern | ||
import codeql_ruby.ast.Variable | ||
private import codeql_ruby.Generated | ||
|
||
/** | ||
* A node in the abstract syntax tree. This class is the base class for all Ruby | ||
* program elements. | ||
*/ | ||
class AstNode extends @ast_node { | ||
Generated::AstNode generated; | ||
|
||
AstNode() { generated = this } | ||
|
||
/** | ||
* Gets the name of a primary CodeQL class to which this node belongs. | ||
* | ||
* This predicate always has a result. If no primary class can be | ||
* determined, the result is `"???"`. If multiple primary classes match, | ||
* this predicate can have multiple results. | ||
*/ | ||
string describeQlClass() { result = "???" } | ||
|
||
/** Gets a textual representation of this node. */ | ||
string toString() { result = "AstNode" } | ||
|
||
/** Gets the location if this node. */ | ||
Location getLocation() { result = generated.getLocation() } | ||
} |
Oops, something went wrong.