sbird1337 / poryscript-language Goto Github PK
View Code? Open in Web Editor NEWSyntax Highlighting for PoryScript (https://github.com/huderlem/poryscript)
License: MIT License
Syntax Highlighting for PoryScript (https://github.com/huderlem/poryscript)
License: MIT License
Hi!
Sorry if this is the incorrect place to ask about the VSCode extension, but I have this issue:
When the extension is downloading, turning it on spams these error messages in the output which makes it almost impossible to do anything:
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/getPoryscriptFiles failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(UseCode Helper (Renderer) --trace-warnings ...
to show where the warning was created)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:53711) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7)
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 8)
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 9)
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 10)
[Error - 9:50:56 PM] Request textDocument/semanticTokens/full failed.
Message: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
Code: -32603
(node:53711) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 4)
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 11)
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 12)
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 13)
(node:53711) UnhandledPromiseRejectionWarning: Error: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
at handleResponse (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
at processMessageQueue (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
at Immediate. (/Users/lucabaumgart/.vscode/extensions/karathan.poryscript-2.2.0/server/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
at processImmediate (internal/timers.js:461:21)
(node:53711) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 14)
etc. etc. etc.
Saving will show these errors:
[Error - 9:54:33 PM] Request textDocument/semanticTokens/range failed.
Message: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
Code: -32603
[Error - 9:54:34 PM] Request textDocument/definition failed.
Message: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
Code: -32603
[Error - 9:54:35 PM] Request textDocument/definition failed.
Message: Request poryscript/readfile failed with message: Cannot read property '0' of undefined
Code: -32603
Any help would be great, thanks!
mismatched casing in the name
switch
statements, the default
case is not highlighted.do...while
statements, the do
is not highlighted.mapscripts
statements, any comments inside are not highlighted (both //
and #
styles of comments).Both //
and #
are valid line comments in Poryscript, but only //
is specified in the language config.
When running the extension in native Windows 10 apparently file URIs or something breaks which will cause the extension to malfunction and spam error messages. It might be related to how file URI's are handled by vscode-languageserver
.
Issues as described in #18 arise from it.
There are instances where a macro is just a macro used in a non-script context. This is not a major issue, but maybe included files could be tagged or put into categories s.t. in some occasions not every parser is executed. This should also save on performance a bit.
The labels for scripts, texts, etc. could use some color. Right now, they aren't recognized as special tokens.
Currently, surroundPairs
and autoClosingPairs
include this entry:
["'", "'"]
However, it should actually be the backtick character, as seen in the raw
command:
["`", "`"]
Currently relative file paths from the workspaceRoot
folder are used to describe the location of e.g. event.inc
- this breaks the usage when not using a workspace environment, or multiple workspace folders. The idea is to use an absolute path and substitute environment variables like ${workspaceFolder}
when reading this setting.
Steps to reproduce:
.macro testcommand testp
to a file that is read by the LSPtestp
is not recognized as a parameterParameter parsing needs to be thought about a bit more
This is a bit vague now, but currently the IntelliSense does not handle defined symbols or constants inside of a .pory
file at all. Those should also be parsed and added as completion hints.
TRUE
, FALSE
, true
, and false
should be some kind of first-class token in this syntax.
I have the following custom symbol include, to highlight and allow me to quickly jump to labels;
{
"expression": "^(\\w+)\\b(?=\\s*(?:\\::))",
"type": "special",
"file": "data/scripts/static_pokemon.inc"
},
It's useful, and has me wanting access to every defined function. However, I can't get wildcards to work for the filepath, so in order to do that I would have to add each script file individually.
Is there a syntax for wildcards that currently works, or is there potential for that to be added?
Thanks!
raw
should be treated the same as script
, text
, etc.
event.inc
and possibly other included files contain assembly constants such as
@ Message box types
MSGBOX_NPC = 2
MSGBOX_SIGN = 3
MSGBOX_DEFAULT = 4
MSGBOX_YESNO = 5
MSGBOX_AUTOCLOSE = 6
they should also be recognized by the IntelliSense and shown as completion hints.
There is also a special macro for defining movements, which should be read and treated accordingly:
create_movement_action face_down
create_movement_action face_up
create_movement_action face_left
create_movement_action face_right
create_movement_action walk_slow_down
create_movement_action walk_slow_up
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.