Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
news
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sartika Aritonang
news
Commits
f74ec5a1
Commit
f74ec5a1
authored
May 29, 2020
by
Sartika Aritonang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete tokens.py
parent
62cf9876
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
69 deletions
+0
-69
tokens.py
stbi/Lib/site-packages/Sqlparse/tokens.py
+0
-69
No files found.
stbi/Lib/site-packages/Sqlparse/tokens.py
deleted
100644 → 0
View file @
62cf9876
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009-2018 the sqlparse authors and contributors
# <see AUTHORS file>
#
# This module is part of python-sqlparse and is released under
# the BSD License: https://opensource.org/licenses/BSD-3-Clause
#
# The Token implementation is based on pygment's token system written
# by Georg Brandl.
# http://pygments.org/
"""Tokens"""
class
_TokenType
(
tuple
):
parent
=
None
def
__contains__
(
self
,
item
):
return
item
is
not
None
and
(
self
is
item
or
item
[:
len
(
self
)]
==
self
)
def
__getattr__
(
self
,
name
):
new
=
_TokenType
(
self
+
(
name
,))
setattr
(
self
,
name
,
new
)
new
.
parent
=
self
return
new
def
__repr__
(
self
):
# self can be False only if its the `root` i.e. Token itself
return
'Token'
+
(
'.'
if
self
else
''
)
+
'.'
.
join
(
self
)
Token
=
_TokenType
()
# Special token types
Text
=
Token
.
Text
Whitespace
=
Text
.
Whitespace
Newline
=
Whitespace
.
Newline
Error
=
Token
.
Error
# Text that doesn't belong to this lexer (e.g. HTML in PHP)
Other
=
Token
.
Other
# Common token types for source code
Keyword
=
Token
.
Keyword
Name
=
Token
.
Name
Literal
=
Token
.
Literal
String
=
Literal
.
String
Number
=
Literal
.
Number
Punctuation
=
Token
.
Punctuation
Operator
=
Token
.
Operator
Comparison
=
Operator
.
Comparison
Wildcard
=
Token
.
Wildcard
Comment
=
Token
.
Comment
Assignment
=
Token
.
Assignment
# Generic types for non-source code
Generic
=
Token
.
Generic
Command
=
Generic
.
Command
# String and some others are not direct children of Token.
# alias them:
Token
.
Token
=
Token
Token
.
String
=
String
Token
.
Number
=
Number
# SQL specific tokens
DML
=
Keyword
.
DML
DDL
=
Keyword
.
DDL
CTE
=
Keyword
.
CTE
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment