Skip to content

Add support for WITH clauses in EXCEPT expressions #520

@TeamDman

Description

@TeamDman
Image

https://discord.com/channels/967118679370264627/967119184209264790/1480750800094630030

User was confused why the following was invalid:

every 20 ticks do

  input * except with tag forge:tools from a slots 0-27
  output to empty slots in b slots 0-27

end
  • Errors
  • line 3:15 mismatched input 'with' expecting {TOP, BOTTOM, LEFT, RIGHT, FRONT, BACK, SECONDS, SECOND, GLOBAL, REDSTONE, IDENTIFIER, STRING}

This is because EXCEPT is currently a statement-wide resource id exclusion, you have to add the tag negation to the individual resource like

input * without tag forge:tools from a slots 0-27

This should be able to be unified such that at program build time we can support WITH clauses in EXCEPT where anything in EXCEPT gets merged into the individual limits for the IOStatement

Metadata

Metadata

Assignees

No one assigned

    Labels

    language featureInvolving the design of the domain-specific language, likely changes to the .g4 ANTLR grammar fileuser experienceSmooth out rough edges

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions