Skip to content
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

Improve parse for module sources #177

Merged
merged 1 commit into from
Aug 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@microsoft/tsdoc",
"comment": "Improve DeclarationReference.parse for module sources",
"type": "patch"
}
],
"packageName": "@microsoft/tsdoc",
"email": "[email protected]"
}
19 changes: 13 additions & 6 deletions tsdoc/src/beta/DeclarationReference.grammarkdown
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Punctuator:: one of
`{` `}` `(` `)` `[` `]` `!` `.` `#` `~` `:` `,`

FutureReservedPunctuator:: one of
`{` `}`
`{` `}` `@`

NavigationPunctuator: one of
`.` // Navigate via 'exports' of symbol
Expand Down Expand Up @@ -107,6 +107,17 @@ Hex4Digits::
CodePoint::
> |HexDigits| but only if MV of |HexDigits| ≤ 0x10FFFF

// Represents the path for a module
ModuleSource::
String
ModuleSourceCharacters

ModuleSourceCharacters::
ModuleSourceCharacter ModuleSourceCharacters?

ModuleSourceCharacter::
SourceCharacter but not one of `"` or `!` or LineTerminator

Component::
String
ComponentCharacters
Expand All @@ -130,13 +141,9 @@ DeclarationReference:
SymbolReference // Shorthand reference to symbol
ModuleSource `!` // Reference to a module
ModuleSource `!` SymbolReference // Reference to an export of a module
ModuleSource `|` `~` SymbolReference // Reference to a local of a module
ModuleSource `!` `~` SymbolReference // Reference to a local of a module
`!` SymbolReference // Reference to global symbol

// Represents the path for a module
ModuleSource:
Component

SymbolReference:
ComponentPath Meaning?
Meaning
Expand Down
Loading