Jamplate is a C-Style pre-processor. Although it is a C-Style, this does not mean it is following the C standard. This pre-processor has almost the same expected behaviour as a standard C pre-processors with some features added and some missing.
This repository is the core processor. You might use the
Jamplate Gradle Plugin instead. If you want to use
the processor directly or just extend it, you might download the repository or
use jitpack.io
. For more info, please visit jamplate.org
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
//replace `Tag` with the targeted version.
implementation 'org.jamplate:processor:Tag'
}
An example of using the Glucose Implementation:
Document document = new PseudoDocument(
//name
"main.jamplate",
//content
"#message Hello ' ' World"
)
Unit unit = new UnitImpl(new GlucoseSpec())
if (
!unit.initialize(document) ||
!unit.parse(document) ||
!unit.analyze(document) ||
!unit.compile(document) ||
!unit.execute(document)
) {
unit.diagnostic()
}
An example of using the Glucose Implementation with the DebugSpec:
Document document = new PseudoDocument(
//name
"main.jamplate",
//content
"#{ Hello ' ' World }#"
)
Unit unit = new UnitImpl(new GlucoseSpec(
DebugSpec.INSTANCE
))
if (
!unit.initialize(document) ||
!unit.parse(document) ||
!unit.analyze(document) ||
!unit.compile(document) ||
!unit.execute(document)
) {
unit.diagnostic()
}
- GitHub Repository: https://github.com/jamplate/processor
- Website: https://jamplate.org
- Author: LSafer
- Licences: Apache 2.0
To submit an issue or a new idea, you might:
- Create a new issue
- Or send me an email on lsafer@cufy.org
Copyright 2021 Cufy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.