importDirective method

Parser importDirective()

Implementation

Parser importDirective() =>
    ref0(importToken) &
        ref0(singleLineStringLexicalToken) &
        ref0(deferredToken).optional() &
        (ref0(asToken) & ref0(identifier)).optional() &
        ((ref0(showToken) | ref0(hideToken)) &
                ref0(identifier).separatedBy(ref1(token, ',')))
            .optional() &
        ref1(token, ';') |
    ref0(exportToken) &
        ref0(singleLineStringLexicalToken) &
        ((ref0(showToken) | ref0(hideToken)) &
                ref0(identifier).separatedBy(ref1(token, ',')))
            .optional() &
        ref1(token, ';') |
    ref0(partToken) & ref0(singleLineStringLexicalToken) & ref1(token, ';');