Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
FourteenBrush committed Mar 5, 2024
2 parents 96eb157 + d4333e7 commit 01a1774
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ name: Java CI with Maven

on:
push:
branches: [ "master" ]
branches: [ "master", "main" ]
pull_request:
branches: [ "master" ]
branches: [ "master", "main" ]

jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip-ci]')"
if: ${{ !contains(github.event.head_commit.message, '[skip-ci]') }}
runs-on: ubuntu-latest

steps:
Expand All @@ -27,7 +27,15 @@ jobs:
java-version: '17'
distribution: 'adopt'
cache: maven

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: FourteenBrush/MathExpressionParser

- name: Trigger Jitpack build
run: curl "https://jitpack.io/com/github/FourteenBrush/MathExpressionParser/${GITHUB_SHA:0:10}/build.log"
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# MathExpressionParser

![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/FourteenBrush/MathExpressionParser/build.yml)
![Code Coverage](https://img.shields.io/codecov/c/github/FourteenBrush/MathExpressionParser)
![GitHub License](https://img.shields.io/github/license/FourteenBrush/MathExpressionParser)
[![GitHub release](https://img.shields.io/github/v/release/FourteenBrush/MathExpressionParser)](https://github.com/FourteenBrush/MathExpressionParser/releases)

A lightweight Java library for parsing and evaluating mathematical expressions.

## Dependency

There is both a Maven and Gradle dependency, which work with [JitPack](https://www.jitpack.io/#FourteenBrush/MathExpressionParser).
In order to use them, replace `Tag` with the appropriate version which you can find on the
Don't forget to replace `Tag` with the appropriate version, which you can find on the
[releases page](https://github.com/FourteenBrush/MathExpressionParser/releases) or on top of this file.

### Maven:
Expand Down Expand Up @@ -92,8 +92,6 @@ This inserts into the global execution environment, examples:
ExpressionParser.insertFunction("twice", number -> number * 2);
double result = ExpressionParser.parse("twice(2)");
assert result == 4;


```

Functions cannot be overloaded, but you can define a function that accepts a variable amount of arguments.
Expand Down Expand Up @@ -128,7 +126,7 @@ assert magic == 1.234;

### Using a custom execution environment (recommended):

As said above, inserting functions or variables will place them in the global symbol lookup.
As mentioned above, inserting functions or variables will place them in the global symbol lookup.
If you want more flexibility over what symbols can be used in what context, you can explicitly provide a
`ExecutionEnv`:

Expand Down

0 comments on commit 01a1774

Please sign in to comment.