aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/lexer.cxx
AgeCommit message (Collapse)AuthorFilesLines
2021-11-23Fix multi-line comment parsing to accept trailing eos in place of newlineBoris Kolpackov1-6/+7
2021-05-28Add support for regex-based target type/pattern specific variablesBoris Kolpackov1-11/+8
This is in addition to the already supported path-based target type/pattern specific variables. For example: hxx{*}: x = y # path-based hxx{~/.*/}: x = y # regex-based
2021-05-28Recognize quoting of first character in tokenBoris Kolpackov1-18/+37
Use this to relax the pattern inclusion/exclusion syntax to only require unquoted +/-.
2020-07-13Reserve backtick (`) and bit-or (|) in eval context for future useBoris Kolpackov1-3/+5
Specifically, they are reserved for future support of arithmetic evaluation contexts and evaluation pipelines, respectively.
2020-06-19Fix lexer to fail on invalid UTF-8 sequencesKaren Arutyunov1-0/+6
2020-06-10Handle special variable names when spelled as $(<char>) rather than $<char>Boris Kolpackov1-0/+3
2020-06-10Handle special variable names in base lexer via mode dataBoris Kolpackov1-1/+13
2020-06-05Add ability to specify ad hoc recipe actionsBoris Kolpackov1-4/+4
We are reusing the buildspec syntax for that.
2020-05-27Add support for value subscript after expansionsBoris Kolpackov1-21/+38
Value subscript is only recognized in evaluation contexts (due to ambiguity with wildcard patterns; consider: $x[123].txt) and should be unseparated from the previous token. For example: x = ($y[1]) x = (($f ? $y : $z)[1]) x = ($identity($y)[$z])
2020-05-27Initial support for ad hoc recipes (still work in progress)Boris Kolpackov1-15/+157
2020-05-01Fix outstanding issue with directive vs assignment differentiationBoris Kolpackov1-5/+18
Specifically, now the following does the right thing: print +foo
2020-03-20Lexer support for default value assignment (?=)Boris Kolpackov1-6/+17
Note: not yet supported in the parser.
2020-02-07Drop copyright notice from source codeKaren Arutyunov1-1/+0
2019-11-15Generalize attributes to be comma-separated with arbitrary valuesBoris Kolpackov1-8/+22
Before: x = [string null] After: x = [string, null]
2019-11-14Tighten up attribute recognition during parsingBoris Kolpackov1-58/+90
Now it should be possible to use `[]` for wildcard patterns, for example: foo = foo.[hit]xx Note that a leading bracket expression will still be recognized as attributes and escaping or quoting it will inhibit pattern matching. To resolve this case we need to specify an empty attribute list: foo = [] [abc]-foo.cxx
2019-09-30Reserve `:` in `case` pattern expression for future match extraction supportBoris Kolpackov1-5/+6
2019-09-30Add support for custom match/extract functions in switch expressionBoris Kolpackov1-5/+29
2019-09-30Add support for `case` pattern alternativesBoris Kolpackov1-2/+25
case <pattern>[ | <pattern>...]
2019-09-30Pattern matching support (switch): multiple values implementationBoris Kolpackov1-4/+11
2019-07-01Split build system into library and driverBoris Kolpackov1-0/+720