-
Notifications
You must be signed in to change notification settings - Fork 38
fix strong mode errors, and a bunch of analyzer messages #13
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,7 +192,7 @@ class TokenKind { | |
static const int PSEUDO_CLASS_NAME = 705; // :pseudoClass | ||
static const int NEGATION = 706; // NOT | ||
|
||
static const List<Map<int, String>> _DIRECTIVES = const [ | ||
static const List<Map<String, dynamic>> _DIRECTIVES = const [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so many lies! I feel deceived! |
||
const {'type': TokenKind.DIRECTIVE_IMPORT, 'value': 'import'}, | ||
const {'type': TokenKind.DIRECTIVE_MEDIA, 'value': 'media'}, | ||
const {'type': TokenKind.DIRECTIVE_PAGE, 'value': 'page'}, | ||
|
@@ -218,13 +218,13 @@ class TokenKind { | |
const {'type': TokenKind.DIRECTIVE_EXTEND, 'value': 'extend'}, | ||
]; | ||
|
||
static const List<Map<int, String>> MEDIA_OPERATORS = const [ | ||
static const List<Map<String, dynamic>> MEDIA_OPERATORS = const [ | ||
const {'type': TokenKind.MEDIA_OP_ONLY, 'value': 'only'}, | ||
const {'type': TokenKind.MEDIA_OP_NOT, 'value': 'not'}, | ||
const {'type': TokenKind.MEDIA_OP_AND, 'value': 'and'}, | ||
]; | ||
|
||
static const List<Map<int, String>> MARGIN_DIRECTIVES = const [ | ||
static const List<Map<String, dynamic>> MARGIN_DIRECTIVES = const [ | ||
const { | ||
'type': TokenKind.MARGIN_DIRECTIVE_TOPLEFTCORNER, | ||
'value': 'top-left-corner' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,6 +197,7 @@ class AttributeSelector extends SimpleSelector { | |
case TokenKind.NO_MATCH: | ||
return ''; | ||
} | ||
return null; | ||
} | ||
|
||
// Return the TokenKind for operator used by visitAttributeSelector. | ||
|
@@ -215,6 +216,7 @@ class AttributeSelector extends SimpleSelector { | |
case TokenKind.SUBSTRING_MATCH: | ||
return 'SUBSTRING_MATCH'; | ||
} | ||
return null; | ||
} | ||
|
||
String valueToString() { | ||
|
@@ -572,6 +574,7 @@ class KeyFrameDirective extends Directive { | |
case TokenKind.DIRECTIVE_O_KEYFRAMES: | ||
return '@-o-keyframes'; | ||
} | ||
return null; | ||
} | ||
|
||
KeyFrameDirective clone() { | ||
|
@@ -676,7 +679,7 @@ class MixinDefinition extends Directive { | |
|
||
/** Support a Sass @mixin. See http://sass-lang.com for description. */ | ||
class MixinRulesetDirective extends MixinDefinition { | ||
final List<RuleSet> rulesets; | ||
final List rulesets; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. any reason we can't preserve the type arg here? or was the list used with a mix of types not just RuleSet? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, exactly, it's not just rulesets. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will get fixed further in a follow up which reduces warnings... I'm almost done there. Do you want me to rebase with those changes or does this initial CL look good to you? |
||
|
||
MixinRulesetDirective(String name, List<VarDefinitionDirective> args, | ||
bool varArgs, this.rulesets, SourceSpan span) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does ddc check for this? or was this an analyzer hint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... yeah, hah!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, neither ... there is a message about missing return, and the John Analyzer noticed it :)