Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rscarson committed Mar 28, 2022
1 parent 4b309f5 commit 86a2d86
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
[![Build Status](https://github.com/rscarson/lavendeux-parser/workflows/Rust/badge.svg)](https://github.com/rscarson/lavendeux-parser/actions?workflow=Rust)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/rscarson/lavendeux-parser/master/LICENSE)

lavendeux-parser is an exensible parsing engine for mathematical expressions.
It supports variable and function assignments, a variety of datatypes, and can
be extended easily at runtime through extensions written in javascript.
lavendeux-parser is an exensible parsing engine for mathematical expressions.
It supports variable and function assignments, a variety of datatypes, and can
be extended easily at runtime through extensions written in javascript.

Extensions are run in a sandboxed environment with no host or network access.
This project is the engine behind [Lavendeux](https://rscarson.github.io/lavendeux/).
Extensions are run in a sandboxed environment with no host or network access.
This project is the engine behind [Lavendeux](https://rscarson.github.io/lavendeux/).

## Getting Started
To use it, create a `ParserState` object, and use it to tokenize input with `Token::new`:
## Getting Started
To use it, create a `ParserState` object, and use it to tokenize input with `Token::new`:
```rust
use lavendeux_parser::{ParserState, ParserError, Token, Value};

Expand Down Expand Up @@ -92,6 +92,8 @@ fn main() -> Result<(), ParserError> {
```
Extensions give a more flexible way of adding functionality at runtime. Extensions are written in javascript.

Extensions are enabled by default, and can be excluded by disabling the crate's "extensions" feature

## Syntax
Expressions can be composed of integers, floats, strings, as well as numbers of various bases:
```javascript
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
//! ```
//!
//! ## Using Extensions
//! Extensions are enabled by default, and can be excluded by disabling the crate's "extensions" feature
//!
//! Extensions can be loaded as follows:
//! ```rust
//! use lavendeux_parser::{ParserState, ParserError, Value, Token};
Expand Down

0 comments on commit 86a2d86

Please sign in to comment.