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

added info returning info map. made object.Array sortable replacing MapKeys, use Equals in constant check, fix missing FLOAT handling #107

Merged
merged 8 commits into from
Aug 5, 2024

Conversation

ldemailly
Copy link
Member

@ldemailly ldemailly commented Aug 5, 2024

  • added info returning info map including identifiers stack (see README.md update for examples) and:
  • made object.Array sortable replacing MapKeys
  • use Equals in constant check and change objects Equals to stay native bool until last minute
  • fix missing FLOAT handling

Example:

$ info
{"all_ids":{0:["E","PI","abs","log2","printf"]},"gofuncs":["acos","asin","atan","ceil","cos","exp","floor","ln","log10","pow","round","sin","sprintf","sqrt","tan","trunc"],"keywords":["else","error","false","first","func","if","len","log","macro","print","println","quote","rest","return","true","unquote"],"platform":"dev  go1.22.5 arm64 darwin","tokens":["!","!=","%","(",")","*","+","++",",","-","--","..","/",":",":=",";","<","<=","=","==",">",">=","[","]","{","}"],"version":"dev"}

@ldemailly ldemailly requested a review from ccoVeille August 5, 2024 19:21
…ore, conversion through NativeBoolToBooleanObject only where needed
@@ -671,9 +671,9 @@ func evalMapInfixExpression(operator token.Type, left, right object.Object) obje
rightMap := right.(object.Map)
switch operator { //nolint:exhaustive // we have default.
case token.EQ:
return object.MapEquals(leftMap, rightMap)
return object.NativeBoolToBooleanObject(object.MapEquals(leftMap, rightMap))
Copy link
Member Author

Choose a reason for hiding this comment

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

like here @ccoVeille

Copy link
Contributor

Choose a reason for hiding this comment

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

I had already marked the file as read, so when I saw the refactoring I thought it was no longer used

Copy link
Member Author

Choose a reason for hiding this comment

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

np and btw thanks a lot for all your time reviewing all these PRs

@ldemailly ldemailly merged commit 8a0b169 into main Aug 5, 2024
1 check passed
@ldemailly ldemailly deleted the info branch August 5, 2024 21:13
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.

2 participants