aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/lexer.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-06-05 06:36:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-06-05 06:36:30 +0200
commit9ec2bdd87659438b4aa021a10c4a4977ef77118e (patch)
tree12580b4d0b82bce80047b067c3bb221b49be7449 /libbuild2/lexer.cxx
parentd280946474568925016359be742b59fd6c000c52 (diff)
Add ability to specify ad hoc recipe actions
We are reusing the buildspec syntax for that.
Diffstat (limited to 'libbuild2/lexer.cxx')
-rw-r--r--libbuild2/lexer.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbuild2/lexer.cxx b/libbuild2/lexer.cxx
index 7149d45..e50ec16 100644
--- a/libbuild2/lexer.cxx
+++ b/libbuild2/lexer.cxx
@@ -125,13 +125,13 @@ namespace build2
//
// 2. Recognizes comma.
//
- // 3. Treat newline as an ordinary space.
- //
- // Also note that we don't have buildspec attributes.
+ // Note that because we use this mode for both the command line
+ // buildspec and ad hoc recipe actions, we control the recognition of
+ // newlines as tokens via the auxiliary data.
//
s1 = " $(){},\t\n";
s2 = " ";
- n = false;
+ n = (data != 0);
break;
}
case lexer_mode::foreign: