Nothing Special   »   [go: up one dir, main page]

Skip to content

snowfallorg/sleet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Nix parser written in TypeScript

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published