Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Start sketching out compile-time known value handling and how we'll r…
…eference values in World (so common it deserves explicit support).
  • Loading branch information
jnthn committed Apr 5, 2012
1 parent 3e9ecfc commit de37dc4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/QAST/CompileTimeValue.nqp
@@ -0,0 +1,5 @@
# Composed or mixed in to any node that also has a compile-time known value.
role QAST::CompileTimeValue {
has $!value;
method value(*@value) { $!value := @value[0] if @value; $!value }
}
2 changes: 2 additions & 0 deletions src/QAST/WorldValue.nqp
@@ -0,0 +1,2 @@
class QAST::WorldValue does QAST::CompileTimeValue {
}
2 changes: 2 additions & 0 deletions tools/build/Makefile.in
Expand Up @@ -87,8 +87,10 @@ QREGEX_PIR = QRegex.pir
QREGEX_PBC = QRegex.pbc
QREGEX_SOURCES = \
src/QRegex.nqp \
src/QAST/CompileTimeValue.nqp \
src/QAST/Node.nqp \
src/QAST/Regex.nqp \
src/QAST/WorldValue.nqp \
src/QAST/Op.nqp \
src/QAST/Compiler.nqp \
src/QRegex/NFA.nqp \
Expand Down

0 comments on commit de37dc4

Please sign in to comment.