Crates.io | ion_shell_parser |
lib.rs | ion_shell_parser |
version | 0.2.0 |
source | src |
created_at | 2024-04-07 10:32:31.477356 |
updated_at | 2024-04-07 10:32:31.477356 |
description | Parser for the scripting language of the ion shell. |
homepage | |
repository | https://gitlab.redox-os.org/redox-os/ion_lsp |
max_upload_size | |
id | 1199019 |
size | 1,446,544 |
This provides a parse for scripting language of [ion shell]
Scripts are tokenized before the actual parsing.
It determines all the special keywords, builtin commands, operators, assignment operators
and words between the noise. Noises are white spaces, new lines or tabs.
The tokeniser returns those noises as tokens too.
These noises tokens are useful for formatting files.
It also important for the syntactic of the script language of ion shell.
Arguments within calls of commands and values in square brackets are separated by white spaces for example.
Every token also has the location where it starts, line and column count.
This property is needed by the LSP server to communicate with the client properly.
See this file for the rules of the tokenisation.
The parsing is concerned about the syntax of a script. Parsing solves the following problems:
The formal grammar is documented under this file
Note
The parser detects if a script file sources another one. However it does not load the files automatically. It is up to the user to get the sourced file. However the parser as an iterator returns a marker item to tell the user if and which file is sourced.
See the changelogs
See the following guide lines
This project, all workspace members and the visual code extension are licensed under MIT License