Skip to content

Generalize code for the two syntaxes defining expansions #56

@ClementSparrow

Description

@ClementSparrow

Currently, there are two syntaxes to introduce new expansion contexts:

  • identifier-defined: When we declare a new object and (in the future), when we declare a property or aggregate or synonym in the LEGEND section, the tag classes used in the object name define an expansion context.
  • parameters-defined: In the COLLISIONLAYERS and RULES sections, when we list known properties and tag classes before a ->.

Common code should be written for all the occurrances of each syntax so that we can easily reuse the syntax to add expansion mechanisms elsewhere (including new features of the engine). The code should be able to manage some of the features needed for parsing the syntax that introduces the expansion context, and some of the features needed to use the expansion context (i.e., check if a specific expansion makes sense in that context, compute the expansion, and log errors).

Metadata

Metadata

Assignees

No one assigned

    Labels

    codeImprove the code without changing functionalityconsole messagesContent and presentation of compilation errors/warnings and other console messagesdebuggingfeatures to help designers understand the engine's behavioreditorConcerns the game editorexpansionany expansion mechanismmappingsAnything that concerns mappingssprite manipulationscopying and transforming spritessyntax/languageConcerns the language or its syntax

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions