Comments (7)
It gets highlighted if you write:
/\=\Z/
But I think both are the same valid regular expression.
from language-ruby.
Ugh, this is annoying:
{
'comment': 'Needs higher precidence than regular expressions.'
'match': '(?<!\\()/='
'name': 'keyword.operator.assignment.augmented.ruby'
}
No more easy fix :(
@envygeeks @nokutu do you two have any ideas about how to differentiate between /=
and a regular expression starting with /=
?
from language-ruby.
/=
is not valid Ruby, from what I gander it's trying to test for []=(
as in:
def []=(key, val)
$stdout.puts key, val
end
from language-ruby.
Well... supposed to be trying to match it, I don't know why the /
is there. Seems like a bug to me.
from language-ruby.
Since the scope is keyword.operator.assignment.augmented
I believe it is actually trying to match /=
(an "augmented" operator that assigns something).
If it's not valid though...hopefully should be a simple deletion!
EDIT: Just did some quick googling and it looks like /=
is valid after all: something like 6 /= 3
should work.
from language-ruby.
@50Wliu you're right, I forgot about that since like literally nobody ever uses it, actually needs to be a var so you'll have to do something like x = 120; x /= 12
It's for assigning the result of the division. You can actually do it with all Maths operators: **=
, *=
, /=
, +=
, -=
from language-ruby.
Actually needs to be a var
I should probably rephrase, it needs to have a setter.
from language-ruby.
Related Issues (20)
- Inconsistent highlighting of constants HOT 1
- Tree Sitter doesn't highlight public/private/protected HOT 1
- Symbol literals have incorrect class HOT 4
- Final `end` does not get highlighted after a block with a rescue inside a method HOT 2
- Inconsistency in Ruby symbol with TreeSitter HOT 2
- where is the path language-ruby get installed to on Windows HOT 1
- Hello HOT 1
- Failed to load a language-ruby package grammar - RHEL 7.7 HOT 20
- Failed to load a language-ruby package grammar HOT 1
- Syntax highlighting stops after <<base in for-each statement
- VS code support HOT 1
- Regex causes Gray (discolored) for large portion of Beginning HOT 13
- Abandoned? HOT 7
- Inconsistent highlighting of heredocs HOT 1
- Syntax highlighting broken in Markdown with inline comment at method definition line
- No release since Nov 2019 HOT 5
- Escaped characters in Ruby regex throws off color syntax highlighter HOT 3
- self.public shouldn't be colored as keyword
- Heredoc wrong colors
- Inconsistent color of local variable
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 language-ruby.