Skip to content

Commit

Permalink
Adjust doc (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebussieres committed Jul 25, 2020
1 parent ed03fae commit 4b0f7fd
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/src/orchid/resources/wiki/guide/extending-pebble.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ The precedence values for existing core operators are as followed:

The following is an example of how the addition operator (`+`) might have been implemented:
```java
public AdditionOperator implements BinaryOperator {
public class AdditionOperator implements BinaryOperator {

public int getPrecedence(){
return 30;
Expand All @@ -201,9 +201,13 @@ public AdditionOperator implements BinaryOperator {
return "+";
}

public Class<? extends BinaryExpression<?>> getNodeClass(){
return AdditionExpression.class;
}
public BinaryExpression<?> getInstance() {
return new AddExpression();
}

public BinaryOperatorType getType() {
return BinaryOperatorType.NORMAL;
}

public Associativity getAssociativity(){
return Associativity.LEFT;
Expand Down Expand Up @@ -308,7 +312,7 @@ public class DefaultAttributeResolver implements AttributeResolver {
String filename,
int lineNumber) {
if (instance instanceof CustomObject) {
return "customValue"
return "customValue";
}
return null;
}
Expand Down

0 comments on commit 4b0f7fd

Please sign in to comment.