Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LEX improvement #1204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

LEX improvement #1204

wants to merge 1 commit into from

Conversation

orimay
Copy link
Contributor

@orimay orimay commented Feb 5, 2022

Must be ES5-compatible. Passes 'match text' test ;)

@amark
Copy link
Owner

amark commented Feb 19, 2022

@orimay 🔥 it looks right, the LEX tests are passing. Deleting my lines of code is the best gold a JSgolfer like me can receive :D :D pure outgamed bliss, I bow to you, this is Objective Truth, Scientific Beauty, and makes my heart sing.

.certify( keeps timing out, usually timeout errors are a problem with the VMs the test runners are on, but .certify( heavily uses LEX so we still may have more digging. You've proven this can work tho. Even if its not a silly thing, it'll make sense to update certify to comply with your simpler/cleaner approach. Do they pass on your machine, or think we need to do another call?

@orimay
Copy link
Contributor Author

orimay commented Feb 19, 2022

Which test would that be?

@amark
Copy link
Owner

amark commented Feb 27, 2022

@orimay https://github.com/amark/gun/blob/master/test/sea/sea.js#L566-L701 .

I hope you're talents & brain are in a healthy place!

if(u !== o['>'] && t >= o['>']){ return true }
if(u !== o['<'] && t <= o['<']){ return true }
return false;
String.match = function(t, o){
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add //target, other comment

Copy link

@syonfox syonfox Sep 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is useful or not to you guys, but for new people might help,
Some sections could probably be added to lex docs somewhere.

I moved this to here so its more findable. If your working on it again at some point maybe take a look and let me know if i am missing something.

https://github.com/amark/gun/wiki/Strings,-Keys-and-Lex-Rules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants