- update maniascript parser to 12.2.0 - allows partial AST to generate, so the extension now works right
- implement: maniascripts in template strings work as own scopes
- maniascript default context is now
CSmMlScriptIngame
, use #RequireContext to switch it. - fix coloration for literal-switch
- added coloring of all consts from all namespaces
- added #Included variable names to autocomplete
- hover provider fixes
- fix parsing special case
#Const External::C_Value as C_Const
- fixed outline generator
- add ctrl-click and outline support for labels
- fixed highlight error on string escape sequences
- update the default doc.h to latest with trackmania2020 api
Template strings without any annotations are considered now as manialink-xml, changed annotates format:
Annotates changed to use format """//! <languageId>
Notice that xml-based languages will have validation errors if annote is left to prod code, use only for IDE and remove when deploying code.
You can now force annotate the language used in template strings. Single line template string will try to detect xml opening tag, if so the templatestring is cast to use XML language. For multiline templatestrings use annotations:
Language | Annotation |
---|---|
XML | """//xml |
Manialink XML | """//manialink |
ManiaScript | """//maniascript or """//ms or """//! |
- Major refactoring... uses now @maniascript/parser
- Minor changes for color highlighter
- Fixed function doc block parser
- Changed highlighter to not hardcoded support classes, instead it parses the classes from doc.h and dynamically highilights them
- Added colors for consts and settings, as well as build-ins for the required context
- Changed
(readonly)
to*readonly*
so the colorizer doesn't think them as functions - Fixed autocomplete on enums
- Added outline aka Symbols Provider
Added notation """//!
to start a template string with maniascript-only content.
- doc.h format has changed for trackmania2020, fixed parser to work with the new version.
- fixes
- add
#Const
and#Setting
as variables for autocomplete - add external library
#Const
and#Struct
to resolvers and autocomplete
- enhance parsers to work better with tabs
- fix function parsers so it can parse arrays and structs as function return type
- allow ctrl-click to find any variable, function, etc anywhere
- Change autocomplete array methods to have proper return types
- Add
.count
property to array autocomplete - Include alias
<=>
as well as=
fordeclare
clauses - Allow
<Maniascript>
tag-support for manialinks- this is to support ubitn titlepack engine scripts
- and some other tmlanguage highlite changes
- update npm dependencies to more recent versions
- Fixes and optimizations for Manialink preview
- Auto update preview window on document change
- Better Manialink Preview rendering...
- Added Manialink Preview
- Fixed typeParsing numerous cases with files of \r\n lineseparators
- Fixed parsing functions with function body defined different line than function declaration
- New snippets for manialink xml files to insert manialink body and xml-mode validation string.* Fixed extension not to crash when external library files are not found in workspace
- Enhance typeparsers and variable resolving.
- Enhance Goto definition: you can now jump between libraries and external files with ctlr-click on external functions and structs.
- add new snippet for #RequireContext
- Enhance: variable resolving.
- Fixed: trackmania api parser for
Array<Type>
- Added: hoverProvider and added alot infos of variables, functions and structs and so on.
- Fixed: enum parser for maniaplanet api, removed trailing comma (,)
- Fixed: definition provider to work actually with manialink xml pages
- Fixed: foreach expression resolves variable type properly
Note: it resolves variable type, but doesn't resolve the level of variable array: ```typescript #Struct M_struct { Text test }
declare M_struct[text][integer] G_mytest;
...
main() {
foreach (test in G_Mytest['test']) {
test[0]._ // autocompleting don't work here, since test is considered M_struct[text][integer]... instead of M_struct[integer] what it should be.
}
}
```
- Add definition provider: you can ctrl-click things to jump definition
- Changes renamer to ignore templatestrings as well
- new feature: xml inside maniascript templatestring with {{{ }}} will now highlite colors for maniascript instead xml string
- Various changes in snippets in order to comply with the maniascript coding style recommendations.
- Fix structs resolver
- New snippet: dlog for debug template, adds as well todo-entry
- New feature: renaming variables, structs, consts and functions works now with f2