Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
class JavaScriptLexer(Lexer): def __init__(self, mgr): class PureJavaScriptStyleClassifier: def __init__(self): class UDLJavaScriptStyleClassifier: def __init__(self): class JavaScriptLangIntel(CitadelLangIntel, def cb_variable_data_from_elem(self, elem): def _functionCalltipTrigger(self, ac, jsClassifier, pos, DEBUG=False): def trg_from_pos(self, buf, pos, implicit=True, def preceding_trg_from_pos(self, buf, pos, curr_pos, def async_eval_at_trg(self, buf, trg, ctlr): def _expand_extra_dirs(self, env, extra_dirs): #def _extra_dirs_from_env(self, env): def _get_stdlibs_from_env(self, env=None): def libs_from_buf(self, buf): def _invalidate_cache(self, env, pref_name): def _invalidate_cache_and_rescan_extra_dirs(self, env, pref_name): def lpaths_from_blob(self, blob): def citdl_expr_from_trg(self, buf, trg): class JavaScriptBuffer(CitadelBuffer): def libs(self): def stdlib(self): def scoperef_from_blob_and_line(self, blob, line): class JavaScriptImportHandler(ImportHandler): def setCorePath(self, compiler=None, extra=None): def _findScannableFiles(self, (files, searchedDirs), dirname, names): def find_importables_in_dir(self, dir): class JavaScriptCILEDriver(CILEDriver): def scan_purelang(self, buf): def scan_multilang(self, buf, csl_cile_driver=None): def scan_csl_tokens(self, file_elem, blob_name, csl_tokens): class JSObject: def __init__(self, name, parent, lineno, depth, type=None, self._class = None # Used when part of a class # completions from the class itself, whereas local def setParent(self, parent): def getFullPath(self): def addAttribute(self, attr): def removeAttribute(self, attr): def hasChildren(self): def isAnonymous(self): def addClassRef(self, baseclass): str, unicode)), "baseclass %r is not a str" % (baseclass,) if baseclass not in self.classrefs: def _mergeVariables(self, existingvar, newvar): def addVariable(self, name, value=None, metadata=None): def addMemberVariable(self, name, value): def getReturnType(self): def __repr__(self): def outline(self, depth=0): def toElementTree(self, cixelement): # Add a "this" member for class functions for baseclass in self.classrefs: for baseclass in self.jsdoc.baseclasses: if baseclass not in self.classrefs: class JSVariable(JSObject): def __init__(self, name, parent, line, depth, vartype='', doc=None, class JSAlias(JSVariable): def __init__(self, *args, **kwargs): class JSArgument(JSVariable): def __init__(self, *args, **kwargs): def outline(self, depth=0): def toElementTree(self, *args, **kwargs): class JSFunction(JSObject): def __init__(self, funcname, parent, args, lineno, depth=0, doc=None, self._class = parent def addReturnType(self, rtype): def addCaller(self, caller, pos, line): def toElementTree(self, cixelement): class JSClass(JSObject): """A JavaScript class object (a function with a non-default .prototype)""" def __init__(self, name, parent, lineno, depth, doc=None, path=None): class JSFile: In JavaScript this is a one-to-one relationship, so this class represents both def __init__(self, path, mtime=None): def __repr__(self): def getFullPath(self): def isAnonymous(self): def outline(self): def hasChildren(self): def _findScopeWithName(self, name, scopeStack, type="variables"): def _lookupVariableType(self, varType, jsobject, scopeStack, depth=0): # Then look for a class members with this name # Then look for a class with this name # print "Found a class with this name" def _lookupVariableTypes(self, jstypelist, scopeStack): # Recursive lookup for the class variables def _updateClassConstructors(self, jsobject): """Recursively update the class constructor name of the given class def updateAllScopeNames(self): log.info("Updating all class constructor names") def addVariable(self, name, value=None, metadata=None): "VAR: %s on line %d, type:%r (class %r)", name, value.line, def convertToElementTreeModule(self, cixmodule): def convertToElementTreeFile(self, cixelement, file_lang, module_lang=None): class JavaScriptCiler: def __init__(self, mgr, path="", mtime=None, lang="JavaScript"): def setStyleValues(self, wordStyle=SCE_C_WORD, def _logVariables(self): def incBlock(self): def decBlock(self): log.debug("Currentclass now: %r", self.currentClass.name) log.debug("Currentclass now: %r", self.currentClass.name) log.debug("Currentclass now: %r", self.currentClass) log.debug("Currentclass now: %r", self.currentClass) # Update line number for the current class if it doesn't have one def _findInScope(self, name, attrlist=("variables", ), scope=None): def _resolveAlias(self, namelist, scope=None): def _locateScopeForName(self, namelist, attrlist=("variables", ), scope=None): # correstponding group for class scopes. def addFunction(self, namelist, args=None, doc=None, isLocal=False, jsclass = self._addClassPart( jsdoc_says_class = False jsdoc_says_class = True if not jsdoc_says_class and self.last_comment_and_jsdoc[0]: jsdoc_says_class = True # Ick, this is really a class constructor jsclass = self._convertFunctionToClass(fn) def _createAnonymousFunctionName(self): def addAnonymousFunction(self, args=None, doc=None, isHidden=False): def addClassFunction(self, namelist, args=None, doc=None): # See if it's a function, we'll convert it into a class then def _addClassPart(self, partName, addType, scopeNames=None, args=None, doc=None, path=None, varCtor=JSVariable): jsclass = None # Find the class to place this part into # jsclass = self._findClassWithNames(scopeNames) # Look for the class first, then if we don't find it look for jsclass = self._locateScopeForName( if jsclass is None or not isinstance(jsclass, JSClass): jsclass = self._locateScopeForName(scopeNames, attrlist=( jsclass = self._convertFunctionToClass(jsclass) jsclass = self.currentClass if not jsclass and scopeNames: jsclass = JSClass( fn._class = jsclass # a class part using prototype.name = function # def addClassPart(self): # a class using classname.prototype = { ... } def addClass(self, namelist, doc=None, path=None, varCtor=JSVariable): """Add a new class using scope.classname.prototype = {...} jsclass = self._addClassPart(namelist[ def addAnonymousClass(self, namelist, doc=None): def addClassOrVariableMember( * If it's class function, then add as a member for the class. class and then add a member variable for the class. log.debug("Adding class prototype. class name: %r, variable: %r", # // Now we want ko.x to move into class ko.f1 # Convert the function to class then # If the class name exists already, assign to that class jsclass = self._locateScopeForName( "Creating class %r, function %r now ctor", funcName, funcName) jsclass = self._convertFunctionToClass(func) # Update the function class information def addClassParent(self, namelist, typeNames): def addGetter(self, namelist, typeNames, scopeNames=None, doc=None): def addSetter(self, namelist, scopeNames=None, doc=None): def _convertFunctionToClassContructor(self, jsfunc, jsclass): "Converting function: %r into a class contructor for: %r", # Add to class and remove from the function "into the class instance", var.name) jsfunc._class = jsclass def _convertFunctionToClass(self, jsfunc): log.debug("Creating class %r, from function %r", funcName, funcName) jsclass = JSClass( for baseclass in jsfunc.jsdoc.baseclasses: def _convertFunctionToClosureVariable(self, jsfunc): def _findOrCreateScope(self, namelist, attrlist=("variables", ), def addVariable(self, namelist, typeNames, toScope=None, doc=None, # Adding to an existing class then # Create a class for it then log.debug("Creating class now: %r", namelist[:-2]) def addObjectVariable(self, namelist, toScope=None, doc=None, # class for it def addReturnObject(self, doc=None): def addFunctionReturnType(self, typeNames, doc=None): def _getParenArguments(self, styles, text, p, paren=None): def _skipOverParenArguments(self, styles, text, p, paren="("): def _skipToEndOfVariableAssignment(self, styles, text, p): def _getArgumentsFromPos(self, styles, text, pos): def _getIdentifiersFromPos(self, styles, text, pos): def _getCitdlTypeInfo(self, styles, text, p): def _getVariableType(self, styles, text, p, assignmentChar="="): def _unquoteJsString(self, s): def _getVariableDetail(self, namelist, styles, text, p, assignmentChar="="): # Check for special class prototypes def _variableHandler(self, lineno, styles, text, p, namelist, "_variableHandler:: Line %d, class function: %r(%r)", "_variableHandler:: Line %d, class member variable: %r (%s=%r)", "_variableHandler:: Line %d, class object variable: %r", lineno, def createObjectArgument(self, styles, text): def _addCodePiece(self, styles, text, pos=0): def _chooseBestVariable(self, jsvar1, jsvar2): def _copyObjectToAnother(self, jsobject, jsother): jsobj._class = jsobj.parent def _handleDefineProperty(self, styles, text, p): def _handleYAHOOExtension(self, styles, text, p): # Add class parent reference jsclass = self._addClassPart(".".join( def _handleDojoExtension(self, type, styles, text, p): jsclass = JSClass(extendClassNamelist[ jsclass = self._addClassPart(".".join( if arg == '{': # super class is null jsclass = self._locateScopeForName(extendClassNamelist, attrlist=( jsclass = self._convertFunctionToClass(jsclass) jsclass.functions[f]._class = jsclass f._class = jsclass # Change function constructor name to the class name so that it def _removeObjectFromScope(self, jsobject): def _handleFunctionApply(self, namelist=None): def _handleFunctionWithArguments(self): def _findScopeFromContext(self, styles, text): # We have a class prototype, find the class and return with that def _resetState(self, newstate=S_DEFAULT): def _popPreviousState(self, keep_style_and_text=False): def _pushAndSetState(self, newstate=S_DEFAULT): def _endOfScanReached(self): def token_next(self, style, text, start_column, start_line, **other_args): # with getters, setters and class prototypes. def scan_puretext(self, content, updateAllScopeNames=True): def convertToElementTreeFile(self, cixelement, file_lang, module_lang=None): def convertToElementTreeModule(self, cixmodule): class Utils(object): def unquoteJsString(s): def _isident(char): def _isdigit(char): def _walk_js_scopes(scope, lpath=None): def _walk_js_symbols(elem, _prefix=None): def register(mgr):
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
other setups
CSS | 27 sec ago | 0.15 KB
SM Sketch
12 hours ago | 1.68 KB
Trajets ETS 2 EvLan4
21 hours ago | 0.32 KB
B7800 HYLK session 1985
1 day ago | 2.25 KB
me
1 day ago | 0.06 KB
FED RESPONSE TEMPLATES: FED HTML Review Feedb...
2 days ago | 0.82 KB
disable email per category (not fully tested)
2 days ago | 0.82 KB
Neuromancer — The Construct Cut (Complete Una...
2 days ago | 3.30 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!