Existence checks on functions now supported.

This commit is contained in:
Timothy Jones
2010-08-26 07:39:30 +12:00
parent 9598b11c77
commit 6224edd6ce
5 changed files with 165 additions and 134 deletions

View File

@@ -312,14 +312,19 @@ grammar =
# Ordinary function invocation, or a chained series of calls.
Invocation: [
o "Value Arguments", -> new CallNode $1, $2
o "Invocation Arguments", -> new CallNode $1, $2
o "Value OptFuncExist Arguments", -> new CallNode $1, $3, $2
o "Invocation OptFuncExist Arguments", -> new CallNode $1, $3, $2
]
# An optional existence check on a function.
OptFuncExist: [
o "", -> no
o "FUNC_EXIST", -> yes
]
# The list of arguments to a function call.
Arguments: [
o "CALL_START ArgList OptComma CALL_END", -> $2
o "FUNC_EXIST CALL_START ArgList OptComma CALL_END", -> $3
]
# Calling super.