Giter Site home page Giter Site logo

roryrjb / vim-vimlparser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vim-jp/vim-vimlparser

0.0 1.0 0.0 1.21 MB

Vim script parser

License: Other

Shell 0.21% JavaScript 30.92% Python 31.92% Makefile 0.14% Batchfile 0.04% Vim Script 36.77%

vim-vimlparser's Introduction

Vim script parsers

Build Status codecov

This is Vim script language (a.k.a. VimL) parsers.

Features

The parser to make AST (Abstract Syntax Tree)

Supported languages

This parser provide same feature for following languages.

  • Vim script
  • Python
  • JavaScript

Example

All of interfaces are provided from vimlparser module. VimLParser parse into AST using StringReader, and Compiler to compile nodes.

let s:VP = vimlparser#import()
let code = [
\ 'let s:message = printf("hello %d", 1+(2*3))'
\]
let r = s:VP.StringReader.new(code)
let p = s:VP.VimLParser.new()
let c = s:VP.Compiler.new()
echo join(c.compile(p.parse(r)), "\n")

This above code output following.

(let = s:message (printf "hello %d" (+ 1 (* 2 3))))

About project name

We know a name "VimL" is not the common short form of "Vim scripting language". But we choice "VimL" for historical and practical reasons and compatibility.

vim-vimlparser's People

Contributors

ynkdir avatar mattn avatar tyru avatar haya14busa avatar blueyed avatar ichizok avatar thinca avatar lehmacdj avatar kuniwak avatar itchyny avatar koron avatar k-takata avatar rianfuro avatar syngan avatar roryrjb avatar tony avatar iamcco avatar get-me-power avatar rhysd avatar ryu-ichiroh avatar ujihisa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.