lang: Allow a list of strings in the resource name
This adds a core looping construct by allowing a list of names to build a resource. They'll all have the same parameters, but they'll intelligently add the correct list of edges that they'd individually create. Constructs like these are one reason we do NOT have actual looping functionality in the language, and it should stay that way.
This commit is contained in:
12
lang/interpret_test/TestAstFunc1/empty-res-list-0.graph
Normal file
12
lang/interpret_test/TestAstFunc1/empty-res-list-0.graph
Normal file
@@ -0,0 +1,12 @@
|
||||
Edge: list(str(hey)) -> var(names) # names
|
||||
Edge: str(hello) -> list(str(hello), str(world)) # 0
|
||||
Edge: str(hey) -> list(str(hey)) # 0
|
||||
Edge: str(world) -> list(str(hello), str(world)) # 1
|
||||
Vertex: list()
|
||||
Vertex: list(str(hello), str(world))
|
||||
Vertex: list(str(hey))
|
||||
Vertex: str(hello)
|
||||
Vertex: str(hey)
|
||||
Vertex: str(name)
|
||||
Vertex: str(world)
|
||||
Vertex: var(names)
|
||||
Reference in New Issue
Block a user