Skip to content

Document the optimistic runtime parser behavior in tests #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
stasm opened this issue Nov 3, 2018 · 0 comments
Open

Document the optimistic runtime parser behavior in tests #301

stasm opened this issue Nov 3, 2018 · 0 comments

Comments

@stasm
Copy link
Contributor

stasm commented Nov 3, 2018

There's a test in fluent/test/primitives_test.js which uses invalid syntax:

selector-attr = { baz.attr ->
    [FooBarBazAttribute] FooBarBaz
   *[other] Other
}

The spec forbids AttributeExpressions as selectors. This test passes, however, because it's a FluentBundle test, and FluentBundle uses the optimistic runtime parser (#289). The optimistic parser focuses on well-formed-ness and doesn't reject this syntax as invalid.

We should fix this test to use a term attribute (-baz.attr). We should also review other tests and we should document other parsing differences like this one by writing more tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant