Skip to content

jwharm/vala-gir-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vala-gir-parser

Reimplementation of the Vala GIR parser and VAPI generator: a new backend for vapigen. The tool is designed with a focus on easy maintainability.

Build and usage

Requires libvala-0.56 to be installed where pkg-config can find it.

Build with meson:

meson setup _build
meson compile -C _build

Use it like you would use vapigen:

_build/vapigen --library libfoo-1.0 Foo-1.0.gir

The tool can be used as a drop-in replacement for the existing vapigen tool. Technically, it acts as a new back-end that vapigen will call.

Please be aware that this project is still in development and is not yet finished.

Design

A Vala AST is generated by a code visitor (GirVisitor) in vapi-builder.vala that convert GIR nodes into Vala symbols.

  • To avoid confusion, most variables that refer to a GIR node are prefixed with g_ (e.g. g_class), while Vala symbols are prefixed with v_ (v_class).

The newly generated namespace is added to the current CodeContext, and then written to a VAPI file by vapigen.vala (this part is completely unchanged).

Contributing

Contributions are welcome. The code is LGPL-licensed. Please post issues and changes on GitHub.

About

Proof-of-concept gir parser developed in Vala

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •