[DO NOT MERGE] Preprocessor#19
Open
therearesomewhocallmetim wants to merge 13 commits intomapsme:new-felinefrom
Open
[DO NOT MERGE] Preprocessor#19therearesomewhocallmetim wants to merge 13 commits intomapsme:new-felinefrom
therearesomewhocallmetim wants to merge 13 commits intomapsme:new-felinefrom
Conversation
Produces a representation of the parsed css, warns about duplicate variable declarations.
The second one splits the styles by tags with selectors and we get all styles for each tag (incl. selectors and subclasses), but for now we get a lot of duplicate styles. The current goal is to find out why we get so many duplicate styles and either prevent it or (anyway) filter them. After that the resulting css file/structure will be transformed into a tree.
|
Ты переписываешь всё с нуля? Может, в новом репозитории? |
|
|
||
| string = "" | ||
|
|
||
| if not filecmp.cmp("../testdata/initial.txt.txt", "../testdata/output.txt.txt"): |
replaced lists of tuples by dictionaries Added sorting and filtering of attributes disregarding their values.
…structure of our mapcss files.
|
|
||
| class BlockSplitter: | ||
| """ | ||
| Should also be initializeable by a preprocessed file |
There was a problem hiding this comment.
В докстрингах хорошо писать документацию к классу, а это больше похоже на коммент.
| VARIABLE = re.compile(r'^\s*(@(?!import).*?)\s*?:\s*?(.*?);', re.DOTALL | re.MULTILINE) | ||
| BLOCK = re.compile(r'^\s*([^@{]*\{.*?\})', re.DOTALL | re.MULTILINE) | ||
|
|
||
| """ |
There was a problem hiding this comment.
Please do not use doc-string as a comment.
We have finally finished writing the tree, and it seems to work so far.
Removed some unnecessary classes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some refactoring and some preprocessing.
I did the refactoring to try and figure out how the original system works.
As far as preprocessing is concerned, I am trying to inflate the mapcss file iteratively spitting out intermediate inflated files to check whether they are correct or not. In the future it might be possible to start the process from one of the intermediate preprocessed files.