Skip to content

Clean up declarations #3558

Open
Open
@Hosch250

Description

@Hosch250

This story is about cleaning up the declarations. Please comment on and extend the design until we are sure it will work before implementing.

So far, I have this system:

public abstract class SyntaxNode
{
    public ParserNodeContext { get; set; }    // Define the qualified selection on the context
    public SyntaxNode Parent { get; set; }
}

public abstract class DeclarationSyntaxNode
{
    public List<IdentifierReference> References { get; set; }
    public VBAParser.AsTypeClauseContext AsTypeContext { get; set;}
    public Accessibility Accessibility { get; set; }
    public bool IsUndeclared { get; set; }
    public string IdentifierName
}

public class ModuleSyntax : DeclarationSyntaxNode
{
    public List<SyntaxNode> ChildDeclarations { get; set; }
}

public class MemberSyntax : DeclarationSyntaxNode
{
    List<ParameterSyntax> Parameters { get; set; }
}

public class VariableSyntax : DeclarationSyntaxNode
{
    // variable, field
}

public class ParameterSyntax : DeclarationSyntaxNode
{
    public PassByModifier PassByModifier { get; set; }    // implicit, byval, byref
}

public abstract class StatementSyntaxNode
{
    // todo: eventually implement a bunch of these for assignments, comparisons, etc.
    // to make it easier than mucking around with the ANTLR parse tree
    // bye bye, handling whitespace and line continuations :)
}

Metadata

Metadata

Labels

difficulty-04-quackheadDare?help wantedparse-tree-processingresolverIssue is easier to resolve with knowledge of the internal resolver API and the Antlr4 parse trees.supportWhether you're using Rubberduck or you've forked it and have questions, never hesitate to ask!technical-debtThis makes development harder or is leftover from a PullRequest. Needs to be adressed at some point.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions