Skip to content

Commit

Permalink
Added example
Browse files Browse the repository at this point in the history
  • Loading branch information
levelicarus committed Mar 1, 2017
1 parent 4a66a54 commit 9f582be
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,29 @@ Note:
- All strings are returned as unicode
- javalang parser expects a syntactically correct class, so need a class template to place functions into.

Example:
```
public class HelloWorld{public static void main(String args[]){if(true){while(true){}}else{}}}
Flattened:
(MethodDeclaration (FormalParameter(ReferenceType))(IfStatement(Literal)(BlockStatement (WhileStatement(Literal)(BlockStatement)))(BlockStatement)))
Expanded:
(MethodDeclaration
(FormalParameter
(ReferenceType)
)
(IfStatement
(Literal)
(BlockStatement
(WhileStatement
(Literal)
(BlockStatement)
)
)
(BlockStatement)
)
)
```

### MOKUTON NO JUTSU!!! ![senju](./images/Senju.gif)

0 comments on commit 9f582be

Please sign in to comment.