Vim script parser
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
autoload Merge pull request #90 from blueyed/delfunction Sep 20, 2018
js Merge pull request #90 from blueyed/delfunction Sep 20, 2018
py Merge pull request #90 from blueyed/delfunction Sep 20, 2018
scripts install huge version for profile command Nov 24, 2017
test Merge pull request #90 from blueyed/delfunction Sep 20, 2018
.codecov.yml Suppress codecov comment and status error Nov 24, 2017
.coveragerc Introduce covimerage for test coverage Nov 24, 2017
.gitignore Introduce byte offset Nov 15, 2017
.travis.yml Travis: use --keep-going with make Apr 22, 2018
LICENSE Create LICENSE, fix #17. Apr 6, 2015
Makefile
README.mkd s/Vim script language/Vim scripting language/ Nov 26, 2017

README.mkd

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:vimlparser = vimlparser#import()
let code = [
\ 'let s:message = printf("hello %d", 1+(2*3))'
\]
let r = s:StringReader.new(code)
let p = s:VimLParser.new()
let c = s: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.