lang, engine: Add a metaparam for catching accidental dollar signs
Let's make our life easier for users!
This commit is contained in:
@@ -14,6 +14,7 @@ test "test" {
|
||||
sema => ["foo:1", "bar:3",],
|
||||
rewatch => false,
|
||||
realize => true,
|
||||
dollar => false,
|
||||
reverse => true,
|
||||
autoedge => true,
|
||||
autogroup => true,
|
||||
|
||||
@@ -14,6 +14,7 @@ test "test" {
|
||||
sema => ["foo:1", "bar:3",],
|
||||
rewatch => false,
|
||||
realize => true,
|
||||
dollar => false,
|
||||
reverse => true,
|
||||
autoedge => true,
|
||||
autogroup => true,
|
||||
@@ -31,6 +32,7 @@ Edge: const -> composite # autoedge
|
||||
Edge: const -> composite # autogroup
|
||||
Edge: const -> composite # burst
|
||||
Edge: const -> composite # delay
|
||||
Edge: const -> composite # dollar
|
||||
Edge: const -> composite # limit
|
||||
Edge: const -> composite # noop
|
||||
Edge: const -> composite # poll
|
||||
@@ -60,3 +62,4 @@ Vertex: const
|
||||
Vertex: const
|
||||
Vertex: const
|
||||
Vertex: const
|
||||
Vertex: const
|
||||
|
||||
@@ -14,6 +14,7 @@ test "t1" {
|
||||
# sema => ["foo:1", "bar:3",],
|
||||
# rewatch => false,
|
||||
# realize => true,
|
||||
# dollar => false,
|
||||
# reverse => true,
|
||||
# autoedge => true,
|
||||
# autogroup => true,
|
||||
@@ -29,6 +30,7 @@ test "t1" {
|
||||
Meta:sema => ["foo:1", "bar:3",],
|
||||
Meta:rewatch => false,
|
||||
Meta:realize => true,
|
||||
Meta:dollar => false,
|
||||
Meta:reverse => true,
|
||||
Meta:autoedge => true,
|
||||
Meta:autogroup => true,
|
||||
|
||||
5
lang/interpret_test/TestAstFunc3/dollar1.txtar
Normal file
5
lang/interpret_test/TestAstFunc3/dollar1.txtar
Normal file
@@ -0,0 +1,5 @@
|
||||
-- main.mcl --
|
||||
$foo = "/tmp/file1"
|
||||
test "$foo" {} # catch simple typos! should be "${foo}"
|
||||
-- OUTPUT --
|
||||
# err: errValidate: test[$foo] did not Validate: the Res name starts with a $
|
||||
7
lang/interpret_test/TestAstFunc3/dollar2.txtar
Normal file
7
lang/interpret_test/TestAstFunc3/dollar2.txtar
Normal file
@@ -0,0 +1,7 @@
|
||||
-- main.mcl --
|
||||
$foo = "/tmp/file1"
|
||||
test "$foo" {
|
||||
Meta:dollar => true, # allow what would normally be a typo!
|
||||
}
|
||||
-- OUTPUT --
|
||||
Vertex: test[$foo]
|
||||
Reference in New Issue
Block a user