aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/parser.cxx
AgeCommit message (Collapse)AuthorFilesLines
2024-01-16Don't enter exported buildfile as real targets (GH issue #357)Boris Kolpackov1-2/+4
In particular, this used to prevent file_rule from match such targets for clean.
2024-01-15Add no_default_target attribute for source, buildfile import directivesBoris Kolpackov1-12/+56
This attribute can be used to disable the default target semantics for the sources/imported buildfile.
2024-01-15Disable default target semantics when loading {bootstrap,root}.buildBoris Kolpackov1-2/+6
2024-01-15Automatically alias unknown target types of imported targetsBoris Kolpackov1-7/+26
2024-01-15Fail with unable to import rather than unknown target typeBoris Kolpackov1-3/+18
2024-01-11Add ability to alias target type from another projectBoris Kolpackov1-34/+104
The syntax is: define <type> = <scope>/<type>
2024-01-09Allow imported buildfiles to using config.* variables from own projectBoris Kolpackov1-28/+161
2023-12-04Improve parser diagnosticsBoris Kolpackov1-1/+5
2023-11-02Minor diagnostics improvementBoris Kolpackov1-1/+1
2023-11-01Add notion of match optionsBoris Kolpackov1-1/+2
Now, when matching a rule, the caller may request a subset of the full functionality of performing an operation on a target. This is achieved with match options.
2023-10-26Minor diagnostics improvementBoris Kolpackov1-4/+12
2023-08-02Diagnose declarations of targets/prerequisites with abstract target typesBoris Kolpackov1-0/+25
2023-06-26Omit dangling symlink warning for backlinked executablesBoris Kolpackov1-13/+44
2023-06-09Diagnose multiple values in typed concatenation (GH issue #263)Boris Kolpackov1-26/+41
2023-06-08Add support for buildfile importationBoris Kolpackov1-105/+377
2023-05-31Provide implied configure_* and dist_* action registration for ad hoc recipesBoris Kolpackov1-2/+11
This makes it consistent with the existing ad hoc rules semantics.
2023-05-29Explicit group: pattern membersBoris Kolpackov1-12/+18
2023-05-29Explicit group: dynamic membersBoris Kolpackov1-2/+2
2023-05-29Explicit group: static membersBoris Kolpackov1-0/+3
2023-05-29Explicit group: syntax parsingBoris Kolpackov1-121/+403
2023-05-16Enter export stub targets with correct outBoris Kolpackov1-12/+36
2023-05-09Add support for dumping build system state in JSON format (GH issue #182)Boris Kolpackov1-2/+6
Specifically: 1. New --dump-format option. Valid values are `buildfile` and `json-v0.1`. 2. The --dump option now recognizes two additional values: `match-pre` and `match-post` to dump the state of pre/post-operations. The `match` value now only triggers dumping of the main operation.
2023-05-03Add --dump-scope and --dump-target options to limit --dump outputBoris Kolpackov1-2/+2
2023-01-31Minor improvement to diagnosticsBoris Kolpackov1-2/+6
2022-12-19Disable `)` escaping in buildspec, command line variable overridesBoris Kolpackov1-6/+5
Similar to line continuations, that would make directory paths on Windows unusable, for example: b info(C:\myproj\) Note that while this is less of a problem in command line variable overrides, we disable it there for consistency.
2022-12-19Disable line continuation in buildspec, command line variable overridesBoris Kolpackov1-4/+6
Line continuations would make directory paths on Windows unusable, for example: b C:\myproj\
2022-12-19Restore newline escaping (line continuations) in double-quoted stringsBoris Kolpackov1-3/+4
Also make effective escaping in buildspec and command line variable overrides consistent with double-quoted strings.
2022-12-15Add noexcept to move constructors and move assignment operatorsKaren Arutyunov1-6/+6
2022-12-15Improve escape sequence supportBoris Kolpackov1-125/+167
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-12-14Improve empty simple value to empty list of names reduction heuristicsBoris Kolpackov1-17/+45
Specifically, do not reduce typed RHS empty simple values for prepend/append and additionally for assignment provided LHS is typed and is a container.
2022-12-14Handle NULL values in $string() and $concat() functionsBoris Kolpackov1-1/+2
This is relied upon by the parser to provide conversion/concatenation semantics consistent with untyped values. Note that we handle NULL values only for types that have empty representation.
2022-12-12Adapt to dir_iterator API changeKaren Arutyunov1-1/+14
2022-12-02Fail if scope or target qualification in variable expansion is unknownBoris Kolpackov1-29/+69
There are three options here: we can "fall through" to an outer scope (there is always the global scope backstop; this is the old semantics, sort of), we can return NULL straight away, or we can fail. It feels like in most cases unknown scope or target is a mistake and doing anything other than failing is just making things harder to debug.
2022-11-29Move buildfiles to root_extra, use vector instead of unordered_setBoris Kolpackov1-1/+3
2022-11-29Improve diagnostics for value subscript out of evaluation contextBoris Kolpackov1-2/+21
2022-11-23Rework diag_buffer interface to facilitate correct destruction orderBoris Kolpackov1-1/+1
2022-11-08Make process exit diagnostics consistentBoris Kolpackov1-1/+1
In particular, we now always print error message on non-0 exit except in cases where such exit is ignored.
2022-11-08More work on child process diagnostics bufferingBoris Kolpackov1-2/+5
2022-10-27Suppress (potential) bogus GCC 12 -Wrestrict warningsBoris Kolpackov1-1/+1
2022-10-25Allow concatenation of path/dir_path type to be a path patternKaren Arutyunov1-6/+49
2022-10-24Allow non-parallel absolute src/out to support imported target taggingBoris Kolpackov1-11/+11
Also fix bug in out clearing.
2022-10-21Change attribute syntax in script to come after variable in set and for (set ↵Karen Arutyunov1-21/+25
x [...], for x [...])
2022-10-20Tweak documentation in parser::parse_for()Karen Arutyunov1-2/+2
2022-10-20Add support for for-loop element typeKaren Arutyunov1-8/+24
2022-10-20Diagnose incorrect output directory specificationBoris Kolpackov1-1/+24
2022-10-14Fix 'for [<attrs>] x: ...' to treat <attrs> as value attributesKaren Arutyunov1-12/+0
2022-10-13Add visibility, overridable variable attributesBoris Kolpackov1-11/+70
2022-10-13Switch to public/private variables modelBoris Kolpackov1-2/+10
Now unqualified variables are project-private and can be typified.
2022-10-10Preparatory work for public/private variable distinctionBoris Kolpackov1-5/+4
We still always use the public var_pool from context but where required, all access now goes through scope::var_pool().
2022-09-29Fix variable append logic in scriptBoris Kolpackov1-0/+12