On 12/30/16, 8:30 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
<carlos.rov...@gmail.com on behalf of carlos.rov...@codeoscopic.com> wrote:

>Hi Alex, a brief summary in this email of where we should look, classes
>involved and some explanations of what should we find would be a great
>place to start. thanks!

It looks like calc() is a function.  It looks like the compiler already
handles some functions like ClassReference() and local(), so I think the
trick is to copy how ClassReference is used in the lexer and parser.  The
lexer is:

compiler/src/main/antlr3/org/apache/flex/compiler/internal/css/CSS.g

The parser is:
compiler/src/main/antlr3/org/apache/flex/compiler/internal/css/CSSTree.g


The parser creates instances of classes that represent the CSS.  A new
class definition for calc() is probably needed.

Then in 
compiler-jx/src/main/java/org/apache/flex/compiler/internal/driver/js/flexj
s/JSCSSCompilationSession.java
The emitCSS method re-generates the CSS file from the data structure.

Thanks,
-Alex

Reply via email to