aboutsummaryrefslogtreecommitdiffstats
path: root/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java
diff options
context:
space:
mode:
authorEgil Moeller <egil.moller@freecode.no>2010-03-22 00:16:53 +0100
committerEgil Moeller <egil.moller@freecode.no>2010-03-22 00:16:53 +0100
commitfc00cfedd6c25d1634a1e0d28a7b7bc5f42e1cd7 (patch)
tree928419d6bfe794865e4b8f0634bd792f795c4b8a /infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java
parent0fdab3db005c4fa31fb8306b573c0b35073d3e56 (diff)
parentd56b9b3b82cdebcaeb00eec0fcb4326ad21adaa8 (diff)
downloadetherpad-fc00cfedd6c25d1634a1e0d28a7b7bc5f42e1cd7.tar.gz
etherpad-fc00cfedd6c25d1634a1e0d28a7b7bc5f42e1cd7.tar.xz
etherpad-fc00cfedd6c25d1634a1e0d28a7b7bc5f42e1cd7.zip
Merge branch 'master' into plugin-framework
Diffstat (limited to 'infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java')
-rw-r--r--infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java55
1 files changed, 55 insertions, 0 deletions
diff --git a/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java b/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java
new file mode 100644
index 0000000..8668f49
--- /dev/null
+++ b/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java
@@ -0,0 +1,55 @@
+/*
+ * YUI Compressor
+ * Author: Julien Lecomte <jlecomte@yahoo-inc.com>
+ * Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+ * Code licensed under the BSD License:
+ * http://developer.yahoo.net/yui/license.txt
+ */
+
+package com.yahoo.platform.yui.compressor;
+
+import yuicompressor.org.mozilla.javascript.Token;
+
+/**
+ * JavaScriptIdentifier represents a variable/function identifier.
+ */
+class JavaScriptIdentifier extends JavaScriptToken {
+
+ private int refcount = 0;
+ private String mungedValue;
+ private ScriptOrFnScope declaredScope;
+ private boolean markedForMunging = true;
+
+ JavaScriptIdentifier(String value, ScriptOrFnScope declaredScope) {
+ super(Token.NAME, value);
+ this.declaredScope = declaredScope;
+ }
+
+ ScriptOrFnScope getDeclaredScope() {
+ return declaredScope;
+ }
+
+ void setMungedValue(String value) {
+ mungedValue = value;
+ }
+
+ String getMungedValue() {
+ return mungedValue;
+ }
+
+ void preventMunging() {
+ markedForMunging = false;
+ }
+
+ boolean isMarkedForMunging() {
+ return markedForMunging;
+ }
+
+ void incrementRefcount() {
+ refcount++;
+ }
+
+ int getRefcount() {
+ return refcount;
+ }
+}