summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-05-10 11:09:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-05-10 11:09:13 +0200
commit4f9022f24c4591391637121c7274d9855b37bd93 (patch)
tree55d15cf4c092e28c588c31daf118cac7b4b5910a /doc
parent963eaef32dc1b35bd065de8b62d4c73a932208b2 (diff)
Add support for options file inclusion
New include-path prefixes, c++: and cli:, are now recognized (e.g., include <cli:foo>;). Without a prefix, the include declarations is considered to be c++-include unless the path ends with the .cli extension. The cli-included files are loaded and parsed. Currently, only inclusion relative to the current file is supported. Duplicate inclusions are detected and ignored based on the absolute filesystem path. If a file cli-includes another file, then the runtime code is assumed to come from the included file and is not generated.
Diffstat (limited to 'doc')
-rw-r--r--doc/language.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/language.txt b/doc/language.txt
index bb00976..0a5ee5f 100644
--- a/doc/language.txt
+++ b/doc/language.txt
@@ -1,8 +1,9 @@
Token types:
keyword
identifier
- punctuation (";" "{" "}" "(" ")" "," "|" "=" ":")
- path-literal
+ punctuation (";" "{" "}" "(" ")" "," "|" "=" ":")
+ cxx-path-literal ("c++:path", <c++:path>, "path", <path>)
+ cli-path-literal ("cli:path", <cli:path>, "path.cli", <path.cli>)
char-literal
string-literal
bool-literal
@@ -20,7 +21,11 @@ include-decl-seq:
include-decl-seq include-decl
include-decl:
- "include" path-literal ";"
+ "include" include-path ";"
+
+include-path:
+ cxx-path-literal
+ cli-path-literal
decl-seq:
decl