ion_shell_parser

Crates.ioion_shell_parser
lib.rsion_shell_parser
version0.2.0
sourcesrc
created_at2024-04-07 10:32:31.477356
updated_at2024-04-07 10:32:31.477356
descriptionParser for the scripting language of the ion shell.
homepage
repositoryhttps://gitlab.redox-os.org/redox-os/ion_lsp
max_upload_size
id1199019
size1,446,544
Florian (BoolPurist)

documentation

README

Parser for the scripting language of ion shell

This provides a parse for scripting language of [ion shell]

Inner working of the parsing

Phase Tokenisation

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.

Phase Parsing

The parsing is concerned about the syntax of a script. Parsing solves the following problems:

  • Validate the correct order of tokens.

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.

Changelog

See the changelogs

Contributing

See the following guide lines

License

This project, all workspace members and the visual code extension are licensed under MIT License

Commit count: 0

cargo fmt