Skip to content

Instantly share code, notes, and snippets.

@rifatx
Created October 20, 2021 10:26
Show Gist options
  • Save rifatx/b0b5bb82fbdda9bac412bf52d7875878 to your computer and use it in GitHub Desktop.
Save rifatx/b0b5bb82fbdda9bac412bf52d7875878 to your computer and use it in GitHub Desktop.
ANTLR PlSqlParser VisitParameter override
public override object VisitParameter(PlSqlParser.ParameterContext context)
{
var p = new Parameter
{
Name = context.parameter_name().GetText(),
Direction =
$"{context.GetChild<TerminalNodeImpl>(0)?.GetText() ?? "IN"}{context.GetChild<TerminalNodeImpl>(1)?.GetText()}",
Type = context.type_spec().GetText()
};
Parameters.Add(p);
return p;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment