aboutsummaryrefslogtreecommitdiff
path: root/build2/test/script/token
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-12 14:53:32 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 08:29:23 +0200
commit18ce15f3aee71debe3f35356c6a739943815da8a (patch)
tree828dea05101c11c5b0b6974b25447226db37debf /build2/test/script/token
parentf423dbc95239cc88021d5d332ad19eeecc6e11e8 (diff)
Initial work on testscript lexer/parser
Diffstat (limited to 'build2/test/script/token')
-rw-r--r--build2/test/script/token45
1 files changed, 45 insertions, 0 deletions
diff --git a/build2/test/script/token b/build2/test/script/token
new file mode 100644
index 0000000..51bf282
--- /dev/null
+++ b/build2/test/script/token
@@ -0,0 +1,45 @@
+// file : build2/test/script/token -*- C++ -*-
+// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef BUILD2_TEST_SCRIPT_TOKEN
+#define BUILD2_TEST_SCRIPT_TOKEN
+
+#include <build2/types>
+#include <build2/utility>
+
+#include <build2/token>
+
+namespace build2
+{
+ namespace test
+ {
+ namespace script
+ {
+ struct token_type: build2::token_type
+ {
+ using base_type = build2::token_type;
+
+ enum
+ {
+ pipe = base_type::value_next, // |
+ clean, // &
+ log_and, // &&
+ log_or, // ||
+
+ in_null, // <!
+ in_string, // <
+ in_document, // <<
+
+ out_null, // <!
+ out_string, // <
+ out_document, // <<
+ };
+
+ using base_type::base_type;
+ };
+ }
+ }
+}
+
+#endif // BUILD2_TEST_SCRIPT_TOKEN