Merge pull request #8786 from hvitved/ruby/dataflow/argument-tokens

Ruby: Implement `Argument[any]` and `Argument[n..]`
This commit is contained in:
Tom Hvitved
2022-04-21 16:31:24 +02:00
committed by GitHub
12 changed files with 103 additions and 46 deletions

View File

@@ -42,9 +42,7 @@ module AccessPath {
* Parses a lower-bounded interval `n..` and gets the lower bound.
*/
bindingset[arg]
private int parseLowerBound(string arg) {
result = arg.regexpCapture("(-?\\d+)\\.\\.", 1).toInt()
}
int parseLowerBound(string arg) { result = arg.regexpCapture("(-?\\d+)\\.\\.", 1).toInt() }
/**
* Parses an integer constant or interval (bounded or unbounded) that explicitly