File:  [parser3project] / parser3 / tests / 360.html
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Thu Feb 11 22:07:15 2021 UTC (5 years, 4 months ago) by moko
Branches: MAIN
CVS tags: release_3_5_1, release_3_5_0, HEAD
parser method call in expression mode no longer differs from call in string mode (related to feature #1211)

@main[]
$n(1)

code junctions ignore in expression flag, this it works:
$x(^if(2){^n.int[]^n.int[]})
$x

this code works after #1211:
^try-catch{ $y(^test[]) }
$y

this code does not work in 3.4.4:
^try-catch{ $z(^test-wrapper[]) }
$z

^try-catch{ string and number: $s(^test-string[]) $s $s.CLASS_NAME}
string and object[]: $s[^test-object[]] $s.CLASS_NAME
string and object(): $n(^test-object[]) $n.CLASS_NAME

#since 3.4.7 numbers are converted to strings in expression context
@test[]
^n.int[]^n.int[]

#in 3.4.5-3.4.6 wrapper hided "in expression" flag, thus no exception
@test-wrapper[]
^test[]

@test-string[]
-^n.int[]

@test-object[]
string value (even non-whitespace!) is ignored if object (^hash::create[]) is returned.

E-mail: