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
feat(core/inlines): make variables context aware #1848
Conversation
@sidvishnoi would like to chat about this. I have some ideas and could use your help. |
54f8073
to
33df189
Compare
@marcoscaceres Removing |
All IDL containers are uniquely named, so the distinction between dictionary and interface is kinda an optimization. So, if we make the the micro-syntax for both the same, then it only becomes a user detail that one is a dictionary and another is an interface. That is:
|
const types = []; | ||
if (isIDL) { | ||
if (elem.dataset.xrefType) { | ||
types.push(...elem.dataset.xrefType.split("|")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will let us support treating attribute and dict-member the same
@@ -547,7 +547,7 @@ describe("Core — xref", () => { | |||
expect(link2.href).toEqual( | |||
expectedLinks.get("PermissionStatus.[[query]]") | |||
); | |||
expect(link2.textContent).toEqual("[[query]]"); | |||
expect(link2.textContent).toEqual("query"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need a thought here
I think we should beta test this with Payment Request a bit. |
Co-Authored-By: marcoscaceres <marcos@marcosc.com>
Fix: get parent's data-link-for context if available Fix: Disambiguate based on shortname or spec Update tests and test data
} | ||
if (splitted.length > 1 && !result.method) { | ||
result.attribute = splitted.pop(); | ||
const methodRegex = /(\w+)\((.*)\)$/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should move these regex outside this function maybe
- Remove special syntax for dict-member - Treat attribute and dict-member same way - Borrow inline-idl-parser from #1848 - Update tests
- Remove special syntax for dict-member - Treat attribute and dict-member same way - Borrow inline-idl-parser from #1848 - Add support for enum and enum-value - Update tests
This is a work in progress