aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/test/script/lexer.cxx
AgeCommit message (Collapse)AuthorFilesLines
2022-12-15Improve escape sequence supportBoris Kolpackov1-3/+5
Specifically: 1. In the double-quoted strings we now only do effective escaping of the special `$("\` characters plus `)` for symmetry. 2. There is now support for "escape sequence expansion" in the form $\X where \X can be any of the C/C++ simple escape sequences (\n, \t, etc) plus \0 (which in C/C++ is an octal escape sequence). For example: info "foo$\n$\tbar$\n$\tbaz" Will print: buildfile:1:1: info: foo bar baz
2022-10-18Fix unexpected 'unterminated double-quoted sequence' script errorKaren Arutyunov1-11/+8
2022-10-13Add support for 'for' loop second (... | for x) and third (for x <...) forms ↵Karen Arutyunov1-8/+20
in script
2021-05-28Recognize quoting of first character in tokenBoris Kolpackov1-3/+2
Use this to relax the pattern inclusion/exclusion syntax to only require unquoted +/-.
2020-06-10Handle special variable names in base lexer via mode dataBoris Kolpackov1-26/+20
2020-05-27Add support for value subscript after expansionsBoris Kolpackov1-8/+7
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-221/+30
2020-02-07Drop copyright notice from source codeKaren Arutyunov1-1/+0
2019-11-15Generalize attributes to be comma-separated with arbitrary valuesBoris Kolpackov1-1/+1
Before: x = [string null] After: x = [string, null]
2019-11-14Tighten up attribute recognition during parsingBoris Kolpackov1-22/+26
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-07-05Move config, dist, test, and install modules into libraryKaren Arutyunov1-0/+551