blob: d8e04f7a4bd5bbe3c3f6927482469669feb54b48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package com.clp.project.ast.nodes;
import java.util.ArrayList;
import com.clp.project.semanticanalysis.SemanticError;
import com.clp.project.semanticanalysis.SymbolTable;
import com.clp.project.ast.types.*;
/**
* Node for the `paramdef` statement of the grammar. Extends the `AtomNode`
* class.
*/
public class ParamdefNode extends AtomNode implements Node {
public ParamdefNode(String val) {
super(val);
}
// FIXME: it should returns the param' type
@Override
public Type typeCheck() {
return new VoidType();
}
@Override
public String toPrint(String prefix) {
return prefix + "Paramdef(" + val + ")\n";
}
}
|