Coder Social home page Coder Social logo

poryscript-language's People

Contributors

bigbahss avatar huderlem avatar jademalo avatar sbird1337 avatar tatatazjj avatar tustin2121 avatar

Watchers

 avatar  avatar  avatar  avatar

poryscript-language's Issues

Extension constantly throwing errors in VSCode

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)
(Use Code 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!

Missing highlighting

  1. In switch statements, the default case is not highlighted.
  2. In do...while statements, the do is not highlighted.
  3. In mapscripts statements, any comments inside are not highlighted (both // and # styles of comments).

Investigate broken windows paths

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.

Every `.macro` is recognized as a command

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.

Use absolute file paths

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.

Read and parse own document

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.

Support for wildcard filepaths in symbolIncludes

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!

Read constants in included files

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
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.