aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-11-04 08:46:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:22 +0200
commit2cdeda47d3315829cf7d5ed46a6f8de187ec9bfb (patch)
tree923ce65814d47bf6ba4219e8d93d4c002c7b6690
parent4b1f902b33d0826ccb2f6d5a1ceb8db7bdd2defe (diff)
Change token type 'name' to more general 'word' (testscript)
-rw-r--r--build2/test/script/lexer2
-rw-r--r--build2/test/script/lexer.cxx10
-rw-r--r--build2/test/script/parser.cxx4
3 files changed, 8 insertions, 8 deletions
diff --git a/build2/test/script/lexer b/build2/test/script/lexer
index be65018..5d77ab9 100644
--- a/build2/test/script/lexer
+++ b/build2/test/script/lexer
@@ -63,7 +63,7 @@ namespace build2
next_line ();
virtual token
- name (bool) override;
+ word (bool) override;
protected:
bool quoted_ = false;
diff --git a/build2/test/script/lexer.cxx b/build2/test/script/lexer.cxx
index 008223c..f752f39 100644
--- a/build2/test/script/lexer.cxx
+++ b/build2/test/script/lexer.cxx
@@ -259,25 +259,25 @@ namespace build2
}
}
- // Otherwise it is a name.
+ // Otherwise it is a word.
//
unget (c);
- return name (sep);
+ return word (sep);
}
token lexer::
- name (bool sep)
+ word (bool sep)
{
// Customized implementation that handles special variable names ($*,
// $~, $NNN).
//
if (state_.top ().mode != lexer_mode::variable)
- return base_lexer::name (sep);
+ return base_lexer::word (sep);
xchar c (peek ());
if (c != '*' && c != '~' && !digit (c))
- return base_lexer::name (sep);
+ return base_lexer::word (sep);
uint64_t ln (c.line), cn (c.column);
string lexeme;
diff --git a/build2/test/script/parser.cxx b/build2/test/script/parser.cxx
index 01dd010..8f910c0 100644
--- a/build2/test/script/parser.cxx
+++ b/build2/test/script/parser.cxx
@@ -441,7 +441,7 @@ namespace build2
f = false;
}
- if (tt == type::name)
+ if (tt == type::word)
{
w = move (t.value);
f = true;
@@ -581,7 +581,7 @@ namespace build2
{
// Check if this is the end marker.
//
- if (tt == type::name &&
+ if (tt == type::word &&
!t.quoted &&
t.value == em &&
peek () == type::newline)