Skip to content

Commit 9c7aead

Browse files
Merge pull request #765 from ossf/document_js_definitions
Note that you can use JavaScript to define terms
2 parents 5af313d + f8910a6 commit 9c7aead

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/labs/create_checker.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,12 @@ Regular expressions make it easy to describe many patterns.
474474
However, it's sometimes useful to give certain sequences names, or
475475
use the same sequence in different circumstances.
476476

477+
You can use JavaScript to define values, and even use values to compute
478+
other values. By convention constants are usually in uppercase letters, e.g.,
479+
`FOO = "bar";`. In a template you can use them using `${...}`, for example,
480+
`${FOO}`.
481+
482+
If you doh't want to use JavaScript's mechanisms, there is an alternative.
477483
Checker allows you to define named terms, and then use them in a regular
478484
expression.
479485
This is done in the `definitions` section, which is a sequence

0 commit comments

Comments
 (0)