Lines Matching refs:self

84     def isAlphanum(self, c):
92 def get(self):
97 c = self.theLookahead
98 self.theLookahead = EOF
100 c = self.input.read(1)
107 def peek(self):
109 self.theLookahead = self.get()
110 return self.theLookahead
112 def next(self):
116 c = self.get()
118 peek = self.peek()
121 c = self.get()
125 self.get()
127 get = self.get()
129 if self.peek() == '/':
130 self.get()
138 def putc(self, c):
139 self.output.write(c)
141 def action(self, d):
150 self.putc(self.theA)
152 self.theA = self.theB
153 if self.theA == '\'' or self.theA == '"':
155 self.putc(self.theA)
156 self.theA = self.get()
157 if self.theA == self.theB:
159 if self.theA == '\\':
160 self.putc(self.theA)
161 self.theA = self.get()
162 if self.theA == EOF:
165 self.theB = self.next()
166 if self.theB == '/' and self.theA in ['(', ',', '=', ':', '[', '!', '&', '|', '?', '{', '}', ';', '\n']:
167 self.putc(self.theA)
168 self.putc(self.theB)
170 self.theA = self.get()
171 if self.theA == '/':
173 if self.theA == '\\':
174 self.putc(self.theA)
175 self.theA = self.get()
176 if self.theA == EOF:
178 self.putc(self.theA)
179 self.theB = self.next()
181 def jsmin(self):
187 self.theA = '\n'
188 self.theLookahead = EOF
189 self.action(3)
190 while self.theA != EOF:
191 if self.theA == ' ':
192 if self.isAlphanum(self.theB):
193 self.action(1)
195 self.action(2)
196 elif self.theA == '\n':
197 if self.theB in ['{', '[', '(', '+', '-']:
198 self.action(1)
199 elif self.theB == ' ':
200 self.action(3)
202 if self.isAlphanum(self.theB):
203 self.action(1)
205 self.action(2)
207 if self.theB == ' ':
208 if self.isAlphanum(self.theA):
209 self.action(1)
211 self.action(3)
212 elif self.theB == '\n':
213 if self.theA in ['}', ']', ')', '+', '-', '"', '\'']:
214 self.action(1)
216 if self.isAlphanum(self.theA):
217 self.action(1)
219 self.action(3)
221 self.action(1)