papyrus-compiler
papyrus-compiler copied to clipboard
Open-source compiler for the Papyrus scripting language of Bethesda games.
Currently the only way to initialize an array at size n with compile time values is to do ```papyrus int[] a = new int[2] a[0] = 5 a[1] = 10...
I see that you have manually included some .psc source files in the extern/ folder. I would just like to point out that I have made a [github repository](https://github.com/MrOctopus/nl_online) that...
From @cadpnq - When two labels are next to one another all branches pointing at the first can be rewritten to point to the second. - When a label is...
`RegisterForUpdate` is a function that in almost all cases can be replaced by the safer `RegisterForSingleUpdate`. A nice feature would be a warning for anyone who uses this function, so...
eg: ```papyrus If true EndIf ``` instead of ```papyrus If (true) EndIf ```
Since function calls can be very costly in Papyrus, it would be helpful if an inline flag for function definitions could be added to the compiler. This feature would speed...
Pre-processor statements (like the c++ style #ifdef) for code blocks would be useful. Would allow for something like: ``` #ifdef debug my_logging_functions_here() #endif ```
When you are missing a source file when compiling, the compiler tells you the name of the missing class, not the name of the missing file. However, the class and...
See https://compileroptimizations.com/category/expression_simplification.htm
See https://compileroptimizations.com/category/constant_propagation.htm