You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Harbs (JIRA)" <ji...@apache.org> on 2017/07/11 11:18:02 UTC

[jira] [Created] (FLEX-35341) Compiler errors for invalid css

Harbs created FLEX-35341:
----------------------------

             Summary: Compiler errors for invalid css
                 Key: FLEX-35341
                 URL: https://issues.apache.org/jira/browse/FLEX-35341
             Project: Apache Flex
          Issue Type: Bug
          Components: FalconJX
    Affects Versions: Apache FalconJX 0.8.0
            Reporter: Harbs
            Priority: Minor


The is room for improvement in the errors that the compiler reports when trying to compile invalid CSS.

For example:

{code:java}
.foo{
	8px 24px 0px;
}
{code}

This correctly causes a compiler error, but the error message is somewhat cryptic:


{noformat}
/Users/harbs/Documents/ApacheFlex/flex-falcon/compiler/src/main/antlr3/org/apache/flex/compiler/internal/css/CSSTree.g: node from after line 13:3 mismatched tree node: <mismatched token: [@111,219:221='8px',<52>,14:3], resync={
			8px 24px 0px;
		}> expecting I_DECL

distributed under the License is distributed on an "AS IS" BASIS,
   ^

/Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/view/components/PreviewBox.mxml(15): col: 4 /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/view/components/PreviewBox.mxml line 14:3 mismatched input '8px' expecting BLOCK_END

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   ^
{noformat}
It shows the correct offending content, but the message is not very clear. Additionally, the line number where the error occurs is wrong.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)