[go: up one dir, main page]

@snowfallorg/sleet
TypeScript icon, indicating that this package has built-in type declarations

0.12.4 • Public • Published

Snowfall Sleet

Nix Flakes Ready Built With Snowfall

  

A Nix parser written in TypeScript.

Usage

Lexer

To use the lexer, import the Lexer class and create a new instance.

import { Lexer } from "@snowfallorg/sleet";

const lexer = new Lexer();

const tokens = lexer.lex("let x = 4; in x");

Parser

To use the parser, import the Parser class and create a new instance.

import { Parser } from "@snowfallorg/sleet";

const parser = new Parser();

const ast = parser.parse("let x = 4; in x");

Implementation

This parser is not resilient. On any malformed input, Sleet will throw an error. This may change in the future, but for now you should know that resilient parsing is not a part of this library.

Readme

Keywords

Package Sidebar

Install

npm i @snowfallorg/sleet

Weekly Downloads

176

Version

0.12.4

License

Apache-2.0

Unpacked Size

88.5 kB

Total Files

8

Last publish

Collaborators

  • jakehamilton