mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Add missing qldoc
This commit is contained in:
@@ -167,6 +167,13 @@ class PrintAstNode extends TPrintAstNode {
|
||||
*/
|
||||
Location getLocation() { none() }
|
||||
|
||||
/**
|
||||
* Holds if this node is at the specified location.
|
||||
* The location spans column `startcolumn` of line `startline` to
|
||||
* column `endcolumn` of line `endline` in file `filepath`.
|
||||
* For more information, see
|
||||
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
|
||||
*/
|
||||
predicate hasLocationInfo(
|
||||
string filepath, int startline, int startcolumn, int endline, int endcolumn
|
||||
) {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/** Definitions of data flow steps for determining flow of regular expressions. */
|
||||
|
||||
import java
|
||||
import semmle.code.java.dataflow.ExternalFlow
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* Definitions for parsing regular expressions.
|
||||
*/
|
||||
|
||||
import java
|
||||
private import RegexFlowConfigs
|
||||
|
||||
@@ -142,7 +146,7 @@ abstract class RegexString extends StringLiteral {
|
||||
}
|
||||
|
||||
bindingset[x]
|
||||
int max_zero(int x) { result = max([x, 0]) }
|
||||
private int max_zero(int x) { result = max([x, 0]) }
|
||||
|
||||
/**
|
||||
* Gets the nesting depth of character classes after position `pos`,
|
||||
@@ -375,11 +379,13 @@ abstract class RegexString extends StringLiteral {
|
||||
not exists(int x, int y | this.backreference(x, y) and x <= start and y >= end)
|
||||
}
|
||||
|
||||
/** Holds if a normal character or escape sequence is between `start` and `end`. */
|
||||
predicate normalCharacter(int start, int end) {
|
||||
this.character(start, end) and
|
||||
not this.specialCharacter(start, end, _)
|
||||
}
|
||||
|
||||
/** Holds if a special character `char` is between `start` and `end`. */
|
||||
predicate specialCharacter(int start, int end, string char) {
|
||||
this.character(start, end) and
|
||||
end = start + 1 and
|
||||
@@ -510,6 +516,7 @@ abstract class RegexString extends StringLiteral {
|
||||
this.simpleGroupStart(start, end)
|
||||
}
|
||||
|
||||
/** Holds if the text in the range start,end is a group with contents in the range in_start,in_end */
|
||||
predicate groupContents(int start, int end, int in_start, int in_end) {
|
||||
this.groupStart(start, in_start) and
|
||||
end = in_end + 1 and
|
||||
|
||||
Reference in New Issue
Block a user