change to varImp
This commit is contained in:
@@ -38,19 +38,19 @@ prototypes returns [ArrayList<Prototype> out]
|
||||
;
|
||||
|
||||
proto returns [Prototype out]:
|
||||
PROTOTYPE t=type i=ident ParO v=vars_locaux ParF
|
||||
PROTOTYPE t=type i=ident ParO v=liste_param ParF
|
||||
{
|
||||
$out=new PrototypeImp($t.return_type,$i.out, $v.out);
|
||||
}
|
||||
;
|
||||
|
||||
vars_locaux returns [ArrayList<String> out]
|
||||
liste_param returns [ArrayList<VarImp> out]
|
||||
@init{
|
||||
$out = new ArrayList<String>();
|
||||
$out = new ArrayList<VarImp>();
|
||||
}:
|
||||
(
|
||||
(ii1=ident {$out.add($ii1.out);})
|
||||
(VIRGULE ii2=ident {$out.add($ii2.out);})*
|
||||
(ii1=ident {$out.add(new VarImp($ii1.out));})
|
||||
(VIRGULE ii2=ident {$out.add(new VarImp($ii2.out));})*
|
||||
)*
|
||||
;
|
||||
|
||||
@@ -64,7 +64,7 @@ functions returns [ArrayList<Function> out]
|
||||
;
|
||||
|
||||
function returns [Function out]:
|
||||
FUNCTION t=type i=ident ParO vars_locaux ParF instr= instruction
|
||||
FUNCTION t=type i=ident ParO liste_param ParF instr= instruction
|
||||
{
|
||||
$out=new FunctionImp($t.return_type, $i.out, $vars_locaux.out, $instr.out);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ public class PrettyprinterVisitor implements ProgramVisitor<String,String>,
|
||||
str+=", ";
|
||||
}
|
||||
}
|
||||
|
||||
return str+")";
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public interface Interface {
|
||||
public interface ProgramLLVMVisitor<H,S> {
|
||||
public S visitProgramLLVM(ProgramLLVMImpl prog, H h);
|
||||
}
|
||||
|
||||
|
||||
//////////DefineLLVM (function)
|
||||
public interface DefineLLVM{
|
||||
public <H,S> S accept(DefineLLVMVisitor<H,S> v, H h);
|
||||
|
||||
Reference in New Issue
Block a user