1.0.21 • Published 2 years ago

holywater-lua-compiler v1.0.21

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Holy Water Narrative To Lua Convertor

npm i holywater-lua-compiler
# or ...
yarn add holywater-lua-compiler
import { Parser, Lexer, CodeGenerator } from 'holywater-lua-compiler'
import { AnyBlock, Block } from 'holywater-lua-compiler/lib/modules/lexer/interfaces/lexer.interface'
import { Lexeme } from 'holywater-lua-compiler/lib/modules/parser/interfaces/parser.interface'


const narrative = "MAIN (shy)\nHello world!!!"

try{
    const lexemes: Array<Lexeme> = new Parser(narrative).parse()
    console.log(lexemes)

    const blocks: Array<Block<AnyBlock>> = new Lexer(lexemes).lexer()
    console.log(blocks)

    const generatedCode: Array<string> = new CodeGenerator(blocks).generate()
    console.log(generatedCode)
}catch(e){
    console.log(e)
}

Contacts: vladyslav.hleb@gen.tech

1.0.21

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.0

2 years ago