VirtualBox

Changeset 108014 in vbox for trunk/include/iprt/script.h


Ignore:
Timestamp:
Feb 1, 2025 7:20:09 PM (3 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167286
Message:

Runtime/common/script/scriptlex.cpp: Fix C string literal scanning and add some helper APIs to create tokens for errors and identifiers, bugref:10733

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/script.h

    r105760 r108014  
    602602RTDECL(int) RTScriptLexScanStringLiteralPascal(RTSCRIPTLEX hScriptLex, char ch, PRTSCRIPTLEXTOKEN pTok, void *pvUser);
    603603
     604
     605/**
     606 * Produces an error token with the given message, used for custom lexer rule implementations.
     607 *
     608 * @returns IPRT status code.
     609 * @param   hScriptLex             The lexer handle.
     610 * @param   pTok                   The token to fill.
     611 * @param   rc                     The status code to use in the message.
     612 * @param   pszMsg                 The format string for the error message.
     613 * @param   ...                    Arguments to the format string.
     614 */
     615RTDECL(int) RTScriptLexProduceTokError(RTSCRIPTLEX hScriptLex, PRTSCRIPTLEXTOKEN pTok, int rc, const char *pszMsg, ...);
     616
     617
     618/**
     619 * Produces an identifier token with the given identifier, used for custom lexer rule implementations.
     620 *
     621 * @returns IPRT status code.
     622 * @param   hScriptLex             The lexer handle.
     623 * @param   pTok                   The token to fill.
     624 * @param   pszIde                 The identifier to add.
     625 * @param   cchIde                 Number of characters in the identifier.
     626 */
     627RTDECL(int) RTScriptLexProduceTokIde(RTSCRIPTLEX hScriptLex, PRTSCRIPTLEXTOKEN pTok, const char *pszIde, size_t cchIde);
    604628/** @} */
    605629
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette