Skip to content

Commit

Permalink
[test] just clarifying comments about the parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Oct 15, 2014
1 parent 930a54d commit f5879fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions compilers/imcc/imcc.y
Expand Up @@ -1930,6 +1930,7 @@ labeled_inst:
| LEXICAL STRINGC COMMA target
{
SymReg *n;
/* This strips the " and ' quotes and treats both as ' */
char *name = mem_sys_strdup($2 + 1);
name[strlen(name) - 1] = 0;
n = mk_const(imcc, name, 'S');
Expand Down
12 changes: 6 additions & 6 deletions t/compilers/imcc/syn/clash.t
Expand Up @@ -236,22 +236,22 @@ OUT
# perl6 has a similar issue but there testcase 2 failed. RT #116643
pir_output_is( <<'CODE', <<'OUT', 'quoted .lex names', todo => 'GH #1095');
.sub 'main' :main
.lex 'bar\o', $P0
.lex 'bar\o', $P0 # ok, parsed as "bar\\o"
$P1 = box 'ok 1'
store_lex 'bar\o', $P1
store_lex 'bar\o', $P1 # ok, parsed as "bar\\o"
$P2 = find_lex 'bar\o'
say $P2
.lex "foo\\o", $P3 # imcc parses that as "foo\\\\o"
.lex "foo\\o", $P3 # wrong, parsed as "foo\\\\o"
$P1 = box 'ok 2'
store_lex "foo\\o", $P1
store_lex "foo\\o", $P1 # wrong, parsed as "foo\\\\o"
$P2 = find_lex "foo\\o"
say $P2
.lex "foo\o", $P4 # imcc parses that as "foo\\o"
.lex "foo\o", $P4 # ok, parsed as "foo\o" (set_lexical)
$P1 = box 'ok 3'
store_lex "foo\o", $P1 # imcc compresses that to "fooo"
$P2 = find_lex "foo\o"
$P2 = find_lex "foo\o" # ditto
say $P2
.end
CODE
Expand Down

0 comments on commit f5879fe

Please sign in to comment.