Skip to content

Add interpolation support selector.#627

Closed
jakejohns wants to merge 1 commit intoleafo:masterfrom
kingyond:master
Closed

Add interpolation support selector.#627
jakejohns wants to merge 1 commit intoleafo:masterfrom
kingyond:master

Conversation

@jakejohns
Copy link

Update phpunit 7.
Fix compile code like:
@at-root a#{&} {
}

@kingyond mentions this fork in #616 (comment) but for some reason hasnt opend a PR. I think there's a couple issues with the fix, but I figure a PR will at least better organize discussion about it. @mind-bending-forks also notes that they believe this fixes #616 as well #616 (comment)

Update phpunit 7.
Fix compile code like:
@at-root a#{&} {

}
Copy link
Author

@jakejohns jakejohns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, this does seem to fix #616, but I think there's at least an issue with upgrading phpunit (I believe phpunit7 requires php^7.1, but scssphp only requires php>=5.4.0), and possibly some coding style issues listed below.

"autoload-dev": {
"psr-4": { "Leafo\\ScssPhp\\Test\\": "tests/" }
"psr-4": { "Leafo\\ScssPhp\\Test\\": "tests/" },
"classmap": [
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add classmap here?

"require-dev": {
"squizlabs/php_codesniffer": "~2.5",
"phpunit/phpunit": "~4.6"
"phpunit/phpunit": "^7"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe phpunit7 requires php^7.1, but scssphp only requires php>=5.4.0


$this->env = $this->filterWithout($envs, $without);
$newBlock = $this->spliceTree($envs, $block, $without);
if (isset($block->atrootParent))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this projects coding standard, but I'm pretty sure using {} is prefered even on single line considitionals.

$this->throwParseError('unexpected }');
}

// if ($block->type == Type::T_AT_ROOT || $block->type == Type::T_MIXIN || $block->type == Type::T_INCLUDE) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this commented code should just not be included, if its not in use.

continue;
}
// self
// if ($this->literal('#{&}', true)) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i assume unused commented code should just be removed

@robocoder
Copy link
Collaborator

Merged #643

@robocoder robocoder closed this Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue while compilling Bootstrap 4.2.1, cannot parse

3 participants