https://github.com/vim-jp/vim-vimlparser
Vim script parser
https://github.com/vim-jp/vim-vimlparser
Last synced: 3 months ago
JSON representation
Vim script parser
- Host: GitHub
- URL: https://github.com/vim-jp/vim-vimlparser
- Owner: vim-jp
- License: other
- Created: 2013-02-17T09:50:55.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2026-01-19T07:44:34.000Z (3 months ago)
- Last Synced: 2026-01-19T14:51:07.153Z (3 months ago)
- Language: Vim Script
- Homepage:
- Size: 1.24 MB
- Stars: 172
- Watchers: 10
- Forks: 27
- Open Issues: 44
-
Metadata Files:
- Readme: README.mkd
- License: LICENSE
Awesome Lists containing this project
README
# Vim script parsers
[](https://github.com/vim-jp/vim-vimlparser/actions?query=workflow%3A%22Test%22) [](https://codecov.io/gh/vim-jp/vim-vimlparser)
This is Vim script language ([a.k.a. VimL](#about-project-name)) 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.
```vim
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.