while (stream_getline($src)) {
last if (/^\s*\}\s*;\s*/);
- if (/^\s*\.(push|kind|ctype|dtor|ctor|check)\s*=\s*(.*?)\s*;\s*$/) {
+ if (/^\s*\.(kind|ctype|dtor|ctor|push|check)\s*=\s*(.*?)\s*;\s*$/) {
$t{$1} = $2;
if ($1 eq "kind") {
if ($2 =~ /^'([bis])'$/) {
}
}
- if (defined $t{type}->{push}) {
- $call =~ s/\$\$/$t{type}->{push}/;
- }
+ die "UNIMPLEMENTED" if defined $t{type}->{push};
if ($t{type}->{kind} eq 'b') {
put_line($f, 0);
foreach (@{$pkg->{props}}) {
my $p = $pkg->{members}{$_};
my %t = find_type($p, $p->{type});
- my $call = $pkg->{cname}.".".$p->{name};
+ my $call = $t{type}->{push} || '$$';
+
+ $call =~ s/\$L/L/;
+ $call =~ s/\$\$/$pkg->{cname}.$p->{name}/;
my $tok = $p->{name};
$tok =~ tr/a-z/A-Z/;
$call = "lua_pushstring(L, $call)";
}
- if (defined $t{type}->{push}) {
- $call =~ s/\$\$/$t{type}->{push}/;
- }
-
put_line($p, 0);
print " case LTK_$tok:\n";
printf " $call;\n";