Vim script parser
Switch branches/tags
Nothing to show
Clone or download
tyru Merge pull request #89 from vim-jp/support-bin-number
Support binary number literals (e.g. 0b0, 0b1011)
Latest commit 1a1cc96 Sep 15, 2018


Vim script parsers

Build Status codecov

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


The parser to make AST (Abstract Syntax Tree)

Supported languages

This parser provide same feature for following languages.

  • Vim script
  • Python
  • Javascript


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 =
let p =
let c =
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.