Skip to content

Releases: aspizu/goboscript

v3.1.1

16 Mar 13:03
Compare
Choose a tag to compare

Changelog

  • 60001f1 bump: update goboscript version to 3.1.1
  • 5a3da31 chore: comment out debug log file creation in pre_processor

Released by GoReleaser.

v3.1.0

16 Mar 11:05
Compare
Choose a tag to compare

goboscript v3.1.0 Release Notes

This release features a refactored pre-processor that fixes several issues, paves the way for new features, and gracefully handles errors.

CONCAT Macro

  • Functionality: Joins two tokens into a single token.
  • Syntax Example:
    CONCAT(LHS, RHS)
    
    # becomes
    
    LHSRHS
    
  • Nesting Support: CONCAT can be nested, for example:
    CONCAT(PREFIX, CONCAT(NAME, SUFFIX))
    
    # becomes
    
    PREFIXNAMESUFFIX
    
  • Limitation: Currently, only name tokens can be joined.

Recursive Macros

  • Improvement: Recursive macros (macros that reference their own name in their definition) are now handled gracefully. Once a macro is expanded, it is marked as suppressed to avoid re-evaluation in the same substitution pass, preventing hangs and infinite loops.

Parsing Ambiguity: Variable-like vs Function-like Macros

  • Issue: When defining a variable-like macro whose definition starts with a ( token, if the token following is a name, it may be misinterpreted as a function-like macro.
  • Solution: To ensure proper parsing, additional parentheses are required. For instance, defining %define unit_range (zero,one) now requires extra parentheses:
    %define unit_range ((zero,one))
    

Recommended Conventions for Macros

  • Function-like Macros: Use these to clearly indicate that the macro expands into an expression (e.g. IS_HOVERED() instead of IS_HOVERED), which avoids confusion with global variables.
  • Naming: Uppercase naming is recommended for macros.
  • Constants: For constants, consider using variable declarations (e.g. var EXAMPLE = 2*(3+4);) if constant-folding optimizations are not required.

Enjoy the improved syntax and reliability of goboscript v3.1.0!

Changelog

  • 40ec4e7 add nix flake
  • e8022e0 add nix flake (#117)
  • c99046c bump: update dependencies to latest versions
  • 3f0a3f5 bump: update goboscript version to 3.1.0
  • f902953 chore: remove unused dependencies and commented code
  • c12e988 feat: add concat macro
  • 443f22d fix: parsing & substitution of zero-parameter function-like macros
  • 7374c8c pre processor rewrite (#118)
  • 0240d91 refactor: pre-processor v2
  • 0b56f65 refactor: pre-processor.rs using AI. (could lead to regressions?)
  • a074b33 refactor: update return type of PreProcessor::define to Result<(), Diagnostic>

Released by GoReleaser.

v3.0.0

02 Mar 14:52
Compare
Choose a tag to compare

Changelog

  • 5fd551c Sounds (#102)
  • 76f183a Sprite props (#98)
  • c2fd4ca Underscore supress (#101)
  • 4ade10b chore: add .goreleaser.yaml configuration and update .gitignore
  • 6cced91 chore: ran cargo update
  • ec86fcc chore: update goboscript version to 3.0.0 in Cargo files
  • af1d931 ci: add cargo test step to workflow for improved validation
  • ac000f5 feat: add 'var' keyword support in vscode syntax highlighting
  • e5cfae9 feat: add 'var' token and support for variable declarations in grammar
  • ba0f281 feat: add compact option to Mutation calls and prototypes
  • 87dec34 feat: add documentation for setting sprite layer order in Goboscript
  • 1cae587 feat: add documentation for sound management in Goboscript
  • a3e3db4 feat: add experimental xxCONCAT to concatenate tokens in pre-processor (don't use)
  • ff1cc12 feat: add map_unless_infinity method and handle Infinity in binary operations
  • 3ddaa89 feat: add method to determine if diagnostic should be suppressed based on name prefix
  • 19baff5 feat: add mutation tag for StopOtherScripts block and fix tools/run
  • 2c93097 feat: add previous and random backdrop options to goboscript syntax
  • 4feff7a feat: add previous and random backdrop options to goboscript syntax closes #91 (#92)
  • 04712b4 feat: add rotation style commands for left-right, all-around, and do-not-rotate
  • 9b4adc7 feat: add rotation style tokens for left-right, all-around, and do-not-rotate
  • 0694486 feat: add rotation style tokens for sprite control
  • 0ac5265 feat: add sound management to sprite, including parsing and serialization
  • e9d57e8 feat: add sprite properties and commands for position, size, volume, and visibility
  • a99c591 feat: add support for 'breakpoint' scratch-addons block
  • 309d9f4 feat: add support for 'error' procedure in code generation
  • e36a32a feat: add support for 'warn' procedure in statement processing
  • eadb368 feat: add support for TurboWarp and Forkphorus checking boolean argument blocks
  • eb3f622 feat: add support for set_layer_order function in Goboscript syntax and parser
  • aa671fb feat: add suppression check for diagnostics based on kind closes #83
  • 5b44bdd feat: add turbowarp/scratch addons block support (#93)
  • 343667d feat: add unrecognized key diagnostic reporting
  • ce0450d feat: add unrecognized key diagnostic reporting (#94)
  • 14ffd39 feat: derive PartialEq for Value enum to enable equality comparisons
  • cb4d67e feat: enhance binary operations to support subtraction with strings and handle Infinity cases
  • f4f2601 feat: enhance variable declaration support with default values
  • 5cb067f feat: implement rotation style management for sprites
  • 1081dbc feat: implement top-level var statement to declare variables (#100)
  • befd8ca feat: prefer sa log over user-defined procedure log
  • 130964e feat: rename 'sa_log' to 'log' and update grammar for log statements
  • c277b27 fix: adjust diagnostic suppression logic to include non-error levels
  • 9a0319d fix: adjust operator associativity for expressions in grammar
  • 8bcc8f5 fix: adjust operator associativity for expressions in grammar (#95)
  • 03fe23b fix: allow usage of structs defined in the stage in any sprite
  • e792c0a fix: correct syntax in visit_stmt function for improved readability
  • c2d0a2c fix: preserve variable default value when re-initializing
  • 92f2912 fix: remove implementation for coerced number operations
  • 6642d93 fix: replace panic with error logging in Expr::Dot code generation
  • 37d2e4f fix: return statements causes multiple function invocation
  • 089b4d0 fix: return statements causes multiple function invocation (#96)
  • 7c989fc fix: stage struct
  • 6392cd6 fmt
  • 9e4f867 refactor: rename pass1 to pass2 and vice versa

Released by GoReleaser.

v2.0.0

11 Feb 01:04
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.2.0...v2.0.0

v1.2.0

28 Jan 18:34
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.0.0...v1.2.0

v1.0.0

25 Mar 18:08
Compare
Choose a tag to compare
Version 1.0.0