1.0.0 • Published 1 year ago

sanscript-js-core v1.0.0

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

SanScript

The development of SanScript centers around three key components: Lexer, Parser, and Interpreter. These components work in harmony to process and execute the SanScript code. Here's a brief overview of each:

Lexer:

  • The Lexer is responsible for breaking down the code into meaningful units called tokens.
  • Tokens are the building blocks that represent the fundamental elements of the code, such as keywords, identifiers, and operators.

Parser:

  • The Parser acts as an architect, creating a structured plan known as an Abstract Syntax Tree (AST).
  • The AST represents the hierarchical structure of the code, capturing its syntax and semantics in a more organized manner.

Interpreter:

  • The Interpreter takes the AST and executes the plan, bringing the SanScript code to life.
  • It ensures the smooth functionality of the code, step by step, aligning with the principles of JavaScript.

Installation

  • Install it globally using command npm i -g sanscript-mjs

Usage

  • The choice of a file extension for SanScript code is .lipi, and to execute the code, one needs to navigate to the SanScript folder and run the following command: aarambh <filename.lipi>