Ohm.js for QML
This is a slightly modified Ohm.js version 16.6.0 adapted to be used with QML.
import QtQml
import ohm // 1) import
QtObject {
Component.onCompleted: {
const g = ohm.grammar(...) // 2) ohm is already available
}
}
If in your project you rely on Qbs, it should be easy to connect the QML module as following:
Project {
// ...
SubProject {
filePath: '3rdParty/ohm.qml/project.qbs'
Properties {
installPrefix: 'path/to/imports/'
}
}
// ...
}