Skip to content

Commit 788c342

Browse files
authored
Merge pull request #3 from jamplate/0.3.0
0.3.0
2 parents d2dce29 + 6f69c7e commit 788c342

421 files changed

Lines changed: 37332 additions & 15248 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ gradle-app.setting
1616

1717
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
1818
# gradle/wrapper/gradle-wrapper.properties
19+
20+
# Scrache Tests
21+
ScratchMainTest.java

Intellij.md

Lines changed: 0 additions & 153 deletions
This file was deleted.

README.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ standard C pre-processors with some features added and some missing.
66

77
### Distribution
88

9-
This repository is the core processor and contain no application. You might use the
9+
This repository is the core processor. You might use the
1010
[Jamplate Gradle Plugin](https://github.com/jamplate/gradle) instead. If you want to use
1111
the processor directly or just extend it, you might download the repository or
1212
use `jitpack.io`. For more info, please visit [jamplate.org](https://jamplate.org)
@@ -22,6 +22,56 @@ dependencies {
2222
}
2323
```
2424

25+
### Usage
26+
27+
An example of using the Glucose Implementation:
28+
29+
```groovy
30+
Document document = new PseudoDocument(
31+
//name
32+
"main.jamplate",
33+
//content
34+
"#message Hello ' ' World"
35+
)
36+
37+
Unit unit = new UnitImpl(new GlucoseSpec())
38+
39+
if (
40+
!unit.initialize(document) ||
41+
!unit.parse(document) ||
42+
!unit.analyze(document) ||
43+
!unit.compile(document) ||
44+
!unit.execute(document)
45+
) {
46+
unit.diagnostic()
47+
}
48+
```
49+
50+
An example of using the Glucose Implementation with the DebugSpec:
51+
52+
```groovy
53+
Document document = new PseudoDocument(
54+
//name
55+
"main.jamplate",
56+
//content
57+
"#{ Hello ' ' World }#"
58+
)
59+
60+
Unit unit = new UnitImpl(new GlucoseSpec(
61+
DebugSpec.INSTANCE
62+
))
63+
64+
if (
65+
!unit.initialize(document) ||
66+
!unit.parse(document) ||
67+
!unit.analyze(document) ||
68+
!unit.compile(document) ||
69+
!unit.execute(document)
70+
) {
71+
unit.diagnostic()
72+
}
73+
```
74+
2575
### Project Info
2676

2777
- GitHub Repository:

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repositories {
1313
}
1414

1515
dependencies {
16-
implementation 'org.cufy:nodes:0.0.9'
16+
implementation 'org.cufy:nodes:0.1.0'
1717
implementation 'org.json:json:20210307'
1818

1919
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'

0 commit comments

Comments
 (0)