Skip to content

Commit

Permalink
logics-py==0.0.11, code reformat, minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
phorward committed Oct 27, 2023
1 parent eb6ba2c commit da6171b
Show file tree
Hide file tree
Showing 5 changed files with 174 additions and 148 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ $(LOGICS_JS): logics.par
unicc -swo $(patsubst %.js,%,$@) -l javascript $?
cd logics-js; npm i; npm run fmt

test:
cd logics-py; pipenv install --dev; pipenv run test
cd logics-js; npm i; npm run test

clean:
rm $(LOGICS_JS) $(LOGICS_PY)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<img src="https://img.shields.io/github/license/viur-framework/logics" alt="Badge displaying the license" title="License badge">
</a>
<a href="https://pypi.org/project/logics-py">
<img alt="Badge showing current PyPI version if logics-py" title="logics-py" src="https://img.shields.io/pypi/v/logics-py?label=logics-py">
<img alt="Badge showing current PyPI version of logics-py" title="logics-py" src="https://img.shields.io/pypi/v/logics-py?label=logics-py">
</a>
<a href="https://www.npmjs.com/package/logics-js">
<img alt="Badge showing current npm version if logics-js" title="logics-js" src="https://img.shields.io/npm/v/logics-js?label=logics-js">
<img alt="Badge showing current npm version of logics-js" title="logics-js" src="https://img.shields.io/npm/v/logics-js?label=logics-js">
</a>
<br>
A tiny, sandboxed, secure and extendable formula language with a flavor of Python.
A multi-platform, sandboxed and extendable expression language with a Python-like syntax.
</div>

## About
Expand Down
8 changes: 3 additions & 5 deletions logics-js/logics.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,11 @@ export default class Logics {

try {
stack.op0(fn(...args));
} catch (e) {
stack.op0(`#ERR:Invalid call to ${fname}()`);
}
catch (e) {
stack.op0(`#ERR:Invalid call to ${fname}()`)
}

} else {
stack.op0(`#ERR:Call to unknown function ${fname}()`)
stack.op0(`#ERR:Call to unknown function ${fname}()`);
}
},
comprehension: () => {
Expand Down
Loading

0 comments on commit da6171b

Please sign in to comment.