-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## JagTag | ||
JagTag is a simple - yet powerful and customizable - interpretted text parsing language! | ||
Some methods are included in the built-in libraries, and additional methods can be defined that utilize the parser environment veriables, as well as the method's input. | ||
|
||
## Simple Example | ||
```java | ||
import me.jagrosh.jagtag.*; | ||
public class Example | ||
{ | ||
public static void main(String[] args) | ||
{ | ||
Parser parser = JagTag.newDefaultBuilder() | ||
.addMethod( new Method("exclaim", (env,in) -> in[0]+"!!!") ) | ||
.build(); | ||
String result = parser.parse("{exclaim:{if:this|=|that|then:Foo Bar|else:Hello World}}"); | ||
System.out.println(result); | ||
} | ||
} | ||
``` | ||
Result: `Hello World!!!` | ||
|
||
## Current Projects | ||
Here are some other projects that utilize JagTag: | ||
* [**Spectra (Discord Bot)**](https://github.com/jagrosh/Spectra) - Spectra uses JagTag in its customizable "tags" (user-created commands), and in welcome and leave messages for servers. (https://github.com/jagrosh/Spectra/blob/master/src/spectra/jagtag/libraries/Discord.java) |