Changeset 5127


Ignore:
Timestamp:
12/14/03 17:12:28 (18 years ago)
Author:
piso
Message:

tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Environment.java

    r4831 r5127  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Environment.java,v 1.8 2003-11-19 02:39:17 piso Exp $
     5 * $Id: Environment.java,v 1.9 2003-12-14 17:12:28 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2727    private Binding functions;
    2828    private Binding blocks;
     29    private Binding tags;
    2930
    3031    public Environment() {}
     
    3637            this.functions = parent.functions;
    3738            this.blocks = parent.blocks;
     39            this.tags = parent.tags;
    3840        }
    3941    }
     
    112114    }
    113115
     116    public void addTagBinding(LispObject tag, LispObject code)
     117    {
     118        tags = new Binding(tag, code, tags);
     119    }
     120
     121    public Binding getTagBinding(LispObject tag)
     122    {
     123        Binding binding = tags;
     124        while (binding != null) {
     125            if (binding.symbol.eql(tag))
     126                return binding;
     127            binding = binding.next;
     128        }
     129        return null;
     130    }
     131
    114132    // Returns body with declarations removed.
    115133    public LispObject processDeclarations(LispObject body)
Note: See TracChangeset for help on using the changeset viewer.