How to use the djangoql.exceptions.DjangoQLParserError function in djangoql

To help you get started, we’ve selected a few djangoql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ivelum / djangoql / djangoql / parser.py View on Github external
def raise_syntax_error(self, message, token=None):
        if token is None:
            raise DjangoQLParserError(message)
        lexer = token.lexer
        if callable(getattr(lexer, 'find_column', None)):
            column = lexer.find_column(token)
        else:
            column = None
        raise DjangoQLParserError(
            message=message,
            value=token.value,
            line=token.lineno,
            column=column,
        )
github ivelum / djangoql / djangoql / parser.py View on Github external
def raise_syntax_error(self, message, token=None):
        if token is None:
            raise DjangoQLParserError(message)
        lexer = token.lexer
        if callable(getattr(lexer, 'find_column', None)):
            column = lexer.find_column(token)
        else:
            column = None
        raise DjangoQLParserError(
            message=message,
            value=token.value,
            line=token.lineno,
            column=column,
        )