Comments (1)
Another example,
test_continue lambda: self:
!let: ijs :be []
self.assertEqual:
()
for: i :in [1,2,3]
for: j :in [1,2,3]
if: (i==j) :then: continue:
ijs.append: [i, j]
self.assertEqual:
[[1, 2],
[1, 3],
[2, 1],
[2, 3],
[3, 1],
[3, 2]]
ijs # Note the extra space here.
test_labeled_continue lambda: self:
!let: ijs :be []
self.assertEqual:
()
for: :top i :in [1,2,3]
for: j :in [1,2,3]
if: (i==j) :then: continue: :top
ijs.append: [i, j]
self.assertEqual:
[[2, 1],
[3, 1],
[3, 2]]
ijs
That barely-noticeable space makes it parse wrong.
from hebigo.
Related Issues (20)
- loops and yield (and async?) HOT 3
- Extra reserved words HOT 1
- Consider renaming the empty hotword from :: to !: HOT 2
- Consider allowing control words to take arguments
- Fix relative imports HOT 2
- implement !let HOT 1
- Add doctests, docstrings, and docs HOT 1
- Consider adding a Python to Hebigo cheatsheet
- Functions made with def are still named lambda?
- Add the ability to run the main module without precompiling
- installation with pipx fails HOT 10
- (just a backlink: I have added to reddit r/whitespaceLisp a link to this repo)
- Consider semicolons for one-liners HOT 1
- Add match/case
- Consider allowing hotword expressions nested in bracketed expressions HOT 5
- Python 3.10 broke the lexer HOT 4
- REPL brittleness
- class macro and decorator syntax HOT 17
- implement if/elif*/else HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hebigo.