Exemple #1
0
        private bool TryResolveAsArg(IToken variable_token, out BRAQParser.Typed_idContext argument_definition)
        {
            if (inside_function && function_argument_scope.ContainsKey(variable_token.Text))
            {
                argument_definition = function_argument_scope[variable_token.Text];
                return(true);
            }

            argument_definition = null;
            return(false);
        }
 /// <summary>
 /// Visit a parse tree produced by <see cref="BRAQParser.typed_id"/>.
 /// <para>
 /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/>
 /// on <paramref name="context"/>.
 /// </para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 /// <return>The visitor result.</return>
 public virtual Result VisitTyped_id([NotNull] BRAQParser.Typed_idContext context)
 {
     return(VisitChildren(context));
 }
 /// <summary>
 /// Exit a parse tree produced by <see cref="BRAQParser.typed_id"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitTyped_id([NotNull] BRAQParser.Typed_idContext context)
 {
 }
Exemple #4
0
 public override Type VisitTyped_id(BRAQParser.Typed_idContext context)
 {
     return(type_dict[context] = string_to_type(context.type_name.Text, this.imported_names));
 }