Arthur Baars
6c579ff608
CFG: link heredoc start to its body
2020-12-07 13:11:21 +01:00
Arthur Baars
49d11b1e09
CFG: don't hide Class and Module nodes
2020-12-07 13:11:21 +01:00
Arthur Baars
0852068bcd
CFG: make lambda a CFG entry point
2020-12-07 13:11:21 +01:00
Arthur Baars
01066ea3bb
CFG: case expression
2020-12-07 13:11:21 +01:00
Arthur Baars
2f238280dc
CFG: model if-modifier and unless
2020-12-07 13:11:21 +01:00
Arthur Baars
5d6e77be28
CFG: model while, until and variants
2020-12-07 13:11:21 +01:00
Arthur Baars
6660cb4417
CFG: for-in loop
2020-12-07 13:11:21 +01:00
Arthur Baars
165b2b37dc
Treat for variables and exception variables as declarations
2020-12-07 13:11:21 +01:00
Arthur Baars
b60ea74e8a
Treat conditional expressions as if-then-else
2020-12-07 13:11:21 +01:00
Arthur Baars
97fab0d18b
Assignments evaluate right-hand-side first
2020-12-07 13:11:21 +01:00
Arthur Baars
465c266b8a
Classes and module are not CfgScopes
2020-12-07 13:11:21 +01:00
Arthur Baars
1d502cb40d
Merge pull request #63 from github/aibaars/fix-warnings
...
Fix warnings and make imports private
2020-12-04 10:43:01 +01:00
Arthur Baars
22fd8908c5
Use private imports
...
No need to have everyting re-export the entire AST
2020-12-03 19:13:05 +01:00
Arthur Baars
582b00ef07
Fix warnings
2020-12-03 19:05:49 +01:00
Arthur Baars
dd3f94a3e2
Update tree-sitter grammar
2020-12-03 18:50:47 +01:00
Tom Hvitved
9129e886b2
Update ql/src/codeql_ruby/ast/Parameter.qll
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2020-12-02 12:07:13 +01:00
Tom Hvitved
77129e473a
Adhere to ::Range pattern
2020-12-02 11:27:00 +01:00
Tom Hvitved
b2483069e0
Add Pattern::getAVariable() and use self range field througout
2020-12-02 10:36:33 +01:00
Tom Hvitved
a370cd8bdf
Move Generated.qll to ast/internal/TreeSitter.qll
2020-12-01 20:53:41 +01:00
Tom Hvitved
d50f5cc785
Address review comments
2020-12-01 15:14:14 +01:00
Tom Hvitved
9820dcb363
Generate VariableAccesses also for defining accesses
2020-12-01 14:39:41 +01:00
Tom Hvitved
bde9f59e0e
Introduce Parameter::getAVariable()
2020-12-01 13:18:06 +01:00
Tom Hvitved
311a0b6b20
Mark more AST predicates as final
2020-12-01 10:24:33 +01:00
Nick Rolfe
baf29ae56b
Add qldoc comment and isOptional predicate to KeywordParameter
2020-11-30 13:42:02 +00:00
Tom Hvitved
c0dd89122c
Handle parameters with overlapping names
2020-11-28 19:23:08 +01:00
Tom Hvitved
58baa33a3f
Various changes to user-facing library
...
- Remove `abstract` classes from public API.
- Align `Variable.qll` with rest of library.
- Introduce `Callable` class.
- Make `Pattern` class cover everything that can be on the LHS of an assignment
and in a pattern (except special parameters such as `**param`).
2020-11-27 17:07:03 +01:00
Tom Hvitved
59d45de118
Move AST files into ast folder
2020-11-27 14:45:15 +01:00
Tom Hvitved
00f3daabfe
Rename Variables.qll to Variable.qll
2020-11-27 14:39:20 +01:00
Nick Rolfe
38b401f04f
Fix import
2020-11-26 16:04:46 +00:00
Nick Rolfe
399170fd58
Add getParent(Index) to user-facing AstNode
2020-11-26 15:33:50 +00:00
Nick Rolfe
c598dc6b5c
Initial work on user-facing AST library
2020-11-26 13:45:45 +00:00
Tom Hvitved
8632cbec71
CFG: Do not descend into nested scopes
2020-11-26 10:58:23 +01:00
Arthur Baars
30cb2cc3e0
CFG: add more CfgScopeRanges
2020-11-26 10:58:23 +01:00
Arthur Baars
89953fd87c
Add parent_index field to @astnode
2020-11-25 13:48:25 +01:00
Arthur Baars
b72db8b6f1
Add parent field to AstNode
2020-11-25 13:48:25 +01:00
Arthur Baars
64ebf5b909
Address comments
2020-11-25 12:55:53 +01:00
Arthur Baars
bc5d7a3b74
Change modelling of Parameters
2020-11-24 19:22:40 +01:00
Arthur Baars
c745978ebb
Fix inconsistent variable references
2020-11-24 19:22:40 +01:00
Tom Hvitved
966e1cdcd0
Apply old formatter to make CI check pass
2020-11-24 11:26:47 +01:00
Tom Hvitved
d0257dda36
Add unique wrapper to AstNode::getParent()
2020-11-23 15:23:21 +01:00
Tom Hvitved
59624454d1
Suggested changes to Variables.qll
...
- Remove `abstract` predicates from public API.
- Cache core computations.
- Redefine `VariableScope::get[A]Variable` to only include variables declared
directly in the scope.
2020-11-23 10:33:34 +01:00
Arthur Baars
49f1143133
Make Variable an IPA type and speed things up on large databases
2020-11-23 09:58:31 +01:00
Tom Hvitved
bb06c1ffeb
Various minor changes to Variables.qll
2020-11-23 09:58:31 +01:00
Arthur Baars
c16a2e77d8
Model local variables
2020-11-23 09:58:31 +01:00
Arthur Baars
6bd476ff30
Add AstNode::getParent
2020-11-23 09:58:31 +01:00
Tom Hvitved
7716d53552
Unbreak PrintAST query
2020-11-19 14:48:14 +01:00
Tom Hvitved
06a6a3feb0
Address review comments
2020-11-19 14:31:08 +01:00
Tom Hvitved
4626168969
CFG: Separate scope for method blocks
2020-11-19 09:29:15 +01:00
Tom Hvitved
4dd4373b53
Initial CFG skeleton code
2020-11-18 20:12:42 +01:00
Nick Rolfe
83a0e5fea6
Refactor to move naming decisions to shared library
2020-11-16 17:54:14 +00:00