@vlocode/apex
Version:
Salesforce APEX Parser and Grammar
27 lines • 881 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormalParameterVisitor = void 0;
const syntaxTreeVisitor_1 = require("./syntaxTreeVisitor");
const typeRefVisitor_1 = require("./typeRefVisitor");
class FormalParameterVisitor extends syntaxTreeVisitor_1.ApexSyntaxTreeVisitor {
constructor(state) {
super(state ?? {
name: '',
type: {
name: '',
isSystemType: false
}
});
}
visitFormalParameter(ctx) {
ctx.id().accept(this);
ctx.typeRef().accept(new typeRefVisitor_1.TypeRefVisitor(this.state.type));
return this.state;
}
visitId(ctx) {
this.state.name = ctx.getText();
return this.state;
}
}
exports.FormalParameterVisitor = FormalParameterVisitor;
//# sourceMappingURL=formalParameterVisitor.js.map