Skip to content

kuszyp/javascript-simple-lexer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

javascript-simple-lexer

About

A simple lexer implemented in JavaScript. It recognizes simple arithmetic expressions and variable assignment like:

2 + 5 == 7;
a = 8;
b = 10;
suma = a + b == 18;

Table of contents

  1. Installation
  2. Usage
  3. Contributing
  4. License
  5. Contact

Installation

Usage

Run the tests:

$ node __tests__

// if all test pass you should see a message 'All passed!!!'

Run the lexer to tokenize script from script.txt file:

// the path to the script.txt file is hardcoded inside 'index.js'
$ node src

// if all went fine the script will print an array of tokens

Contributing

License

This project is licensed under the MIT License.

Contact

About

A CLI tool that walks through js files and finds jQuery usages

Resources

License

Stars

Watchers

Forks