Skip to content

Comments

Add -n / --no-entry-point flag to nwn_script_comp#152

Open
cgtudor wants to merge 1 commit intoniv:masterfrom
cgtudor:support-no-entry-point-compilation
Open

Add -n / --no-entry-point flag to nwn_script_comp#152
cgtudor wants to merge 1 commit intoniv:masterfrom
cgtudor:support-no-entry-point-compilation

Conversation

@cgtudor
Copy link

@cgtudor cgtudor commented Feb 10, 2026

This flag allows the compilation of a file (or files) without requiring an entry point (void main or StartingConditional). Useful for validating files, the main purpose for its creation is compatibility with the vscode language server which needs to "compile" include files to validate syntax errors even if they don't produce compiled code.

Testing

Manual testing with the following types of .nss scripts:

  • Script with a void main()
    • With intentional syntax errors - fails with correct error message
    • Without intentional syntax errors - succeeds
  • Script with a StartingConditional
    • With intentional syntax errors - fails with correct error message
    • Without intentional syntax errors - succeeds
  • Script without a void main() or StartingConditional
    • With intentional syntax errors - fails with correct error message
    • Without intentional syntax errors - succeeds

Changelog

Added

  • Added -n / --no-entry-point flag to nwn_script_comp which allows the compilation of a file (or files) without requiring an entry point. Useful for validating files.

Licence

  • I am licencing my change under the project's MIT licence, including all changes to GPL-3.0 licenced parts of the codebase.

This flag allows the compilation of a file (or files) without requiring an entry point (void main or StartingConditional). Useful for validating files, especially for compatibility with the vscode language server.
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.

1 participant