Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve GO statement grammar #353

Merged
merged 2 commits into from
Aug 19, 2024
Merged

Conversation

NeoKaios
Copy link
Contributor

Remove possibility to have more than one procedure when no DEPENDING clause is set

@NeoKaios
Copy link
Contributor Author

NeoKaios commented Aug 19, 2024

@nberth We could even add a goto_stmt type in the ptree type.
like so

type goto_stmt =
  | GoToSimple of { target: procedure_name with_loc }
  | GoToDepending of
      {
        targets: procedure_name with_loc nel;
        depending_on: ident;
      }
  | GoToEntry of
      {
        targets: alphanum with_loc nel;
        depending_on: ident option;
      }

What do you think ?

@nberth
Copy link
Collaborator

nberth commented Aug 19, 2024

@nberth We could even add a goto_stmt type in the ptree type. like so

type goto_stmt =
  | GoToSimple of { target: procedure_name with_loc }
  | GoToDepending of
      {
        targets: procedure_name with_loc nel;
        depending_on: ident;
      }
  | GoToEntry of
      {
        targets: alphanum with_loc nel;
        depending_on: ident option;
      }

What do you think ?

Yes that looks good to me ;-)

Copy link
Collaborator

@nberth nberth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Minor details to adjust, and a missing reference in the Improvements to the grammar entry in CHANGELOG.md.

src/lsp/cobol_ptree/branching_statements.ml Outdated Show resolved Hide resolved
src/lsp/cobol_parser/grammar.mly Outdated Show resolved Hide resolved
src/lsp/cobol_parser/grammar.mly Outdated Show resolved Hide resolved
@nberth nberth merged commit d9b0282 into OCamlPro:master Aug 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants