diff options
| author | Rich Hickey <richhickey@gmail.com> | 2006-04-02 16:34:00 +0000 |
|---|---|---|
| committer | Rich Hickey <richhickey@gmail.com> | 2006-04-02 16:34:00 +0000 |
| commit | ab3658c3f102d470c146260c87d7ea34b365126f (patch) | |
| tree | 25af35169d4be51c310372e6788ef4e05ea865c7 /src/cli/runtime/Keyword.cs | |
| parent | ad76fd174341a19ec4b311c17d3c760637d81724 (diff) | |
Initial commit of CLI runtime
Diffstat (limited to 'src/cli/runtime/Keyword.cs')
| -rw-r--r-- | src/cli/runtime/Keyword.cs | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/cli/runtime/Keyword.cs b/src/cli/runtime/Keyword.cs new file mode 100644 index 00000000..8748cdf1 --- /dev/null +++ b/src/cli/runtime/Keyword.cs @@ -0,0 +1,49 @@ +/** + * Copyright (c) Rich Hickey. All rights reserved. + * The use and distribution terms for this software are covered by the + * Common Public License 1.0 (http://opensource.org/licenses/cpl.php) + * which can be found in the file CPL.TXT at the root of this distribution. + * By using this software in any fashion, you are agreeing to be bound by + * the terms of this license. + * You must not remove this notice, or any other, from this software. + **/ + +/* rich Mar 29, 2006 10:39:05 AM */ + +using System;
+ +namespace org.clojure.runtime
+{ + +public class Keyword : Symbol
+ { +/** + * Used by Namespace.intern() + * + * @param name + * @param ns + */ +internal Keyword(String name, Namespace ns): + base(name, ns) + + { + this.val = this; + this.fn = this; + } + +override public Object getValue(ThreadLocalData tld) + { + return this; + } + +override public Object setValue(ThreadLocalData tld, Object val) + { + throw new InvalidOperationException("Cannot set the value of a keyword"); + } + +override public String ToString() + { + return ":" + name; + } +} +}
\ No newline at end of file |
