Skip to content

Instantly share code, notes, and snippets.

@veox
Last active March 31, 2020 20:19
Show Gist options
  • Save veox/7810938e8559994f207a036b2362ac72 to your computer and use it in GitHub Desktop.
Save veox/7810938e8559994f207a036b2362ac72 to your computer and use it in GitHub Desktop.
diff --git a/lib/rouge/lexers/solidity.rb b/lib/rouge/lexers/solidity.rb
index 3c98caad..8c6369f0 100644
--- a/lib/rouge/lexers/solidity.rb
+++ b/lib/rouge/lexers/solidity.rb
@@ -91,11 +91,10 @@ module Rouge
)
# size helpers
- sizesm = (0..256).step(8)
- sizesn = (8..256).step(8)
+ sizesm = (8..256).step(8)
+ sizesn = (0..80)
sizesmxn = sizesm.map { |m| m }
.product( sizesn.map { |n| n } )
- .select { |m,n| m+n <= 256 }
# [u]fixed{MxN}
@reserved.merge(sizesmxn.map { |m,n| "fixed#{m}x#{n}" })
@reserved.merge(sizesmxn.map { |m,n| "ufixed#{m}x#{n}" })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment