This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 231249 - unable to parse some language constructs due to current tokenization
Summary: unable to parse some language constructs due to current tokenization
Status: RESOLVED WORKSFORME
Alias: None
Product: web
Classification: Unclassified
Component: CSS Editor (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal with 3 votes (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
: 209068 234840 237166 237420 237725 237829 237837 238431 244994 246091 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-14 06:53 UTC by Selpi
Modified: 2015-06-01 08:40 UTC (History)
12 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (35.35 KB, text/plain)
2013-06-14 06:53 UTC, Selpi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Selpi 2013-06-14 06:53:34 UTC
Product Version = NetBeans IDE Dev (Build 201306122301)
Operating System = Linux version 3.8.0-25-generic running on amd64
Java; VM; Vendor = 1.7.0_21
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.21-b01

In one of the projects I've found a css file, marked as invalid with this error: 'Unexpected token OR found'

#fonts-com-setup-form .or {
  font-weight: bold;
  padding-left: 1.5em;
}
Comment 1 Selpi 2013-06-14 06:53:37 UTC
Created attachment 135784 [details]
IDE log
Comment 2 Marek Fukala 2013-06-20 12:09:46 UTC
caused by using a keywords as class name. There's much more cases like this, needs a complex solution.
Comment 3 Marek Fukala 2013-08-05 13:38:47 UTC
*** Bug 209068 has been marked as a duplicate of this bug. ***
Comment 4 Marek Fukala 2013-08-05 13:39:53 UTC
Bug 209068 complains about "ONLY" token. The same problem happens for all the defined fixed text tokens.
Comment 5 Marek Fukala 2013-08-20 12:22:00 UTC
Another case:

https://netbeans.org/bugzilla/show_bug.cgi?id=227510#c0 - case#7

dimensione token (.3dtransform) needs to act as a mixin name.

The problem is in the current css parser implementation which mixes plain css/sass/less into one grammar. Then some of the keywords of one language may play different roles in the others.
Comment 6 Marek Fukala 2013-08-26 07:19:05 UTC
Issue 234840 - Use of the identifier "when" seems to cause issues in the editor:

>In a SASS file, the line "li.when {}" is underlined and marked with "Unexpected >token LESS_WHEN found.
Comment 7 Marek Fukala 2013-08-26 07:19:19 UTC
*** Bug 234840 has been marked as a duplicate of this bug. ***
Comment 8 Vladimir Riha 2013-09-27 07:17:42 UTC
Once fixed, will it also resolve issues when HTML element has class with value "when" or "only" which is now being marked as error?

 <div class="only">TODO write content</div>
Comment 9 Marek Fukala 2013-09-27 08:03:46 UTC
(In reply to Vladimir Riha from comment #8)
> Once fixed, will it also resolve issues when HTML element has class with
> value "when" or "only" which is now being marked as error?
> 
>  <div class="only">TODO write content</div>
yes
Comment 10 Vladimir Riha 2013-10-29 07:12:59 UTC
*** Bug 237166 has been marked as a duplicate of this bug. ***
Comment 11 Vladimir Riha 2013-10-29 07:13:29 UTC
*** Bug 237420 has been marked as a duplicate of this bug. ***
Comment 12 Vladimir Riha 2013-10-29 08:03:17 UTC
*** Bug 237725 has been marked as a duplicate of this bug. ***
Comment 13 Tuman 2013-10-30 21:53:07 UTC
*** Bug 237829 has been marked as a duplicate of this bug. ***
Comment 14 Vladimir Riha 2013-11-01 07:33:36 UTC
*** Bug 237837 has been marked as a duplicate of this bug. ***
Comment 15 Vladimir Riha 2013-11-16 12:39:36 UTC
*** Bug 238431 has been marked as a duplicate of this bug. ***
Comment 16 Vladimir Riha 2014-06-11 06:22:06 UTC
*** Bug 244994 has been marked as a duplicate of this bug. ***
Comment 17 Vladimir Riha 2014-08-21 09:11:18 UTC
*** Bug 246091 has been marked as a duplicate of this bug. ***
Comment 18 bjrn 2014-10-03 10:07:35 UTC
This bug is still present in 8.x (which I only mention because we're past the target milestone).
Comment 19 silverinnovation 2015-03-03 11:23:50 UTC
Hi, I can also confirm this is still a problem in V8.0.2
In my case, a CSS file has a class declaration using the 'or' keyword which should be fine.

i.e. 
.caption .or{ display:block; color:#fff; font-size:22px; padding-top:19px}

Please can I nudge this one back onto the radar :)
Comment 20 trvsw 2015-05-31 20:28:02 UTC
I'm having this issue also in NetBeans 8.0.2 with a css class named 'or' in Magento's codebase.
Comment 21 Milutin Kristofic 2015-06-01 08:40:22 UTC
This was fixed in dev build in Bug #248270 .