Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Issue warning for empty units during semantic analysis #8

@pramodk

Description

@pramodk

Empty unit name declaration is valid according to the original implementation in NEURON:

i.e.

UNITS 
{
                   () = (millivolt)
}

is accepted now. Note the empty bracket on the left where there should be a name. Similarly, function declarations like the below are now also accepted:

FUNCTION ssCB(kdf(), kds()) (mM) 
{
}

Above behaviour was implemented in #3 in order to pass the fail existing ModelDB files.

When we will have semantic analysis pass for error checking, we can add a check to see if there is an empty unit definition like above and then error / throw exception. This way, parsing will be successful but the semantic analysis will be a "proper" place to do such checking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestparserParser related issuesemanticsRelated to semantics of the language

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions