0.1.2 • Published 1 year ago

puckchain v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

puckchain

A javascript toolchain of compiler frontend for you to parse codes and make some amazing things.

img   img   GitHub

Contents

1、User Guide

(1) What is puckchain

It's a javascript toolchain of compiler frontend for you to parse codes and make some amazing things, such as code editor, domain specific language, etc.

(2) What will it bring to us

It provides some out of box components of compiler frontend, you can solve many scenarios that require parsing code.

2、Install

git clone https://github.com/WGrape/puckchain/
npm install

3、Usage

(1) chain-lexer

let puckChain = require('puckChain');
lexer = puckChain.chainLexer.cLexer;
let code = "int a = 20;";
lexer.start("code");
let parsedTokens = lexer.DFA.result.tokens;