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 244667 - SASS 3.3 Maps - unexpected tokens
Summary: SASS 3.3 Maps - unexpected tokens
Status: RESOLVED WORKSFORME
Alias: None
Product: web
Classification: Unclassified
Component: CSS Preprocessors (SASS, LESS, ...) (show other bugs)
Version: 8.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-22 23:04 UTC by combic
Modified: 2015-07-13 10:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description combic 2014-05-22 23:04:57 UTC
With valid declaration of SASS map, like:

$susy: (
    columns: 8,
    gutters: 1/10
);

(see also http://susydocs.oddbird.net/en/latest/settings/)

Netbeans is showing parse error:

Unexpected token COLON found
Unexpected token WS found
Unexpected token NUMBER found

Because of above the rest of .scss file is rendered wrongly (destroyed syntax colours etc.). But CSS preprocessor is generating output file correctly, because syntax is valid and should not been highlighted as invalid by Netbeans.
Comment 1 Vladimir Riha 2014-05-29 14:11:07 UTC
reproducible, maps is one of the new features in Sass 3.3. From [1], following also does not work:
  - @at-root
  - Multiple assignment in @each loops


[1] http://thesassway.com/news/sass-3-3-released
Comment 2 Marek Fukala 2014-07-10 13:29:34 UTC
I'm working on this issue already. However it will take some time since there's a lot of issues with just the parsing of the new 3.3 stuff plus the editor features themselves not working for them either.
Comment 3 Marek Fukala 2014-07-10 14:37:40 UTC
changeset:   275272:a67551730f61
user:        Marek Fukala <mfukala@netbeans.org>
date:        Thu Jul 10 16:35:48 2014 +0200
summary:     #244667 - parsing support for SASS 3.3 maps

---

other parts will follow soon...
Comment 4 Quality Engineering 2014-07-11 02:21:47 UTC
Integrated into 'main-silver', will be available in build *201407110001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a67551730f61
User: Marek Fukala <mfukala@netbeans.org>
Log: #244667 - parsing support for SASS 3.3 maps
Comment 5 Quality Engineering 2014-07-12 05:10:20 UTC
Integrated into 'main-silver', will be available in build *201407120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f38c80f14483
User: Marek Fukala <mfukala@netbeans.org>
Log: #244667 - fixing nested sass map declarations, adding folding and completion
Comment 6 Marek Fukala 2014-07-14 10:41:45 UTC
changeset:   275343:f0f4d8851b51
summary:     #244909 - @at-root sass directive support

changeset:   275345:f3cc7189eed0
summary:     #244909 - multiple assignments in SASS @each loops
Comment 7 Vladimir Riha 2014-08-19 12:20:01 UTC
Verified, thank you

Product Version: NetBeans IDE 8.0.1 (Build 201408142300)
Java: 1.7.0_65; Java HotSpot(TM) Client VM 24.65-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_65-b17
System: Linux version 3.13.0-32-generic running on i386; UTF-8; en_US (nb)
Comment 8 jeffymahoney 2014-09-12 23:29:37 UTC
I download the most recent development build  today and am still getting those the same three errors with this map:

$site-colors: (
  "darkrust": #544741,
  "black": #000000
)
Comment 9 Vladimir Riha 2014-09-15 06:13:09 UTC
Thanks for catching that, I haven't found it in documentation, but clearly keys can be wrapped in quotes. If you can, you can remove the quotes

$site-colors: (
  darkrust: #544741,
  black: #000000
)

I filed issue 247107 for this case. Thanks
Comment 10 filipeaclima 2015-06-24 11:27:11 UTC
If we use color names as keys, the compiler throws warnings and errors.

For example, if I have the following:

$colors: (
	black: #000,
	blue: #03a9f4,
	green": #4caf50,
	grey: #25282a,
	orange: #f48603,
	red: #ff5252,
	white: #fff
);

@each $name, $value in $colors {
	.#{$name} {
		color: $value !important;
	}
	.#{$name}-bg {
		background-color: $value !important;
	}
}

The SASS compiler throws errors.
If the keys are quoted, the file compiles without warnings or errors but Netbeans show a parsing error.
Comment 11 Milutin Kristofic 2015-07-13 10:57:46 UTC
filipeaclima what is your netbeans version? Because your code works on dev build of Netbeans 

Product Version: NetBeans IDE Dev (Build 20150713-34f4983c5f8a)
Java: 1.8.0_40; Java HotSpot(TM) 64-Bit Server VM 25.40-b25

You have a bug in a code with green"