Skip to content

kaigouthro/pine-lang

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

404 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nom-lua53

A toy parser for Pine language written using nom inspired by nom-lua53

Usage

extern crate pine;
use std::io::{self, Read};
use nom_lua53::{parse_all, ParseResult};

fn main() {
    let mut input = Vec::new();
    io::stdin().read_to_end(&mut input).expect("couldn't read from stdin");
    match parse_all(&*input) {
        ParseResult::Done(ss) => {
            println!("Done. statements == {:#?}", ss);
        }
        ParseResult::Error(rest, ss) => {
            println!("Error. statements == {:#?}", ss);
            println!("rest == '{}'", String::from_utf8_lossy(rest));
        }
    }
}

About

The pine languate from tradingview that implement with rust languate and nom library.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 98.1%
  • JavaScript 0.8%
  • TypeScript 0.6%
  • HTML 0.3%
  • Shell 0.1%
  • Python 0.1%