From d7c5ad7d6263fd1baf9bfdbaa4c50b70ef2fbdb2 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 8 Jun 2010 08:22:05 +0200 Subject: reverted folder structure change for better mergeing with upstream --- .../yui/compressor/JavaScriptIdentifier.java | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java (limited to 'trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java') diff --git a/trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java b/trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java new file mode 100644 index 0000000..8668f49 --- /dev/null +++ b/trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java @@ -0,0 +1,55 @@ +/* + * YUI Compressor + * Author: Julien Lecomte + * 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; + } +} -- cgit v1.2.3-1-g7c22