Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c312b4b

Browse files
Add missing qldoc
1 parent 57ba8a4 commit c312b4b

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

java/ql/lib/semmle/code/java/PrintAst.qll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ class PrintAstNode extends TPrintAstNode {
167167
*/
168168
Location getLocation() { none() }
169169

170+
/**
171+
* Holds if this node is at the specified location.
172+
* The location spans column `startcolumn` of line `startline` to
173+
* column `endcolumn` of line `endline` in file `filepath`.
174+
* For more information, see
175+
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
176+
*/
170177
predicate hasLocationInfo(
171178
string filepath, int startline, int startcolumn, int endline, int endcolumn
172179
) {

java/ql/lib/semmle/code/java/regex/RegexFlowModels.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/** Definitions of data flow steps for determining flow of regular expressions. */
2+
13
import java
24
import semmle.code.java.dataflow.ExternalFlow
35

java/ql/lib/semmle/code/java/regex/regex.qll

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Definitions for parsing regular expressions.
3+
*/
4+
15
import java
26
private import RegexFlowConfigs
37

@@ -142,7 +146,7 @@ abstract class RegexString extends StringLiteral {
142146
}
143147

144148
bindingset[x]
145-
int max_zero(int x) { result = max([x, 0]) }
149+
private int max_zero(int x) { result = max([x, 0]) }
146150

147151
/**
148152
* Gets the nesting depth of character classes after position `pos`,
@@ -375,11 +379,13 @@ abstract class RegexString extends StringLiteral {
375379
not exists(int x, int y | this.backreference(x, y) and x <= start and y >= end)
376380
}
377381

382+
/** Holds if a normal character or escape sequence is between `start` and `end`. */
378383
predicate normalCharacter(int start, int end) {
379384
this.character(start, end) and
380385
not this.specialCharacter(start, end, _)
381386
}
382387

388+
/** Holds if a special character `char` is between `start` and `end`. */
383389
predicate specialCharacter(int start, int end, string char) {
384390
this.character(start, end) and
385391
end = start + 1 and
@@ -510,6 +516,7 @@ abstract class RegexString extends StringLiteral {
510516
this.simpleGroupStart(start, end)
511517
}
512518

519+
/** Holds if the text in the range start,end is a group with contents in the range in_start,in_end */
513520
predicate groupContents(int start, int end, int in_start, int in_end) {
514521
this.groupStart(start, in_start) and
515522
end = in_end + 1 and

0 commit comments

Comments
 (0)