diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2010-07-10 01:27:17 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2010-07-10 01:27:17 +0200 |
commit | e65240c658ac1d43c5e2c1dcffd83d15605dc0f4 (patch) | |
tree | cf3e52b19db66ff3eda5161445584ef797a0d651 /src | |
parent | f87943409c8ae2e9f6ed81e7a1cfc5109c16f31a (diff) | |
download | eva-e65240c658ac1d43c5e2c1dcffd83d15605dc0f4.tar eva-e65240c658ac1d43c5e2c1dcffd83d15605dc0f4.zip |
Use variable _ as wildcard
Diffstat (limited to 'src')
-rw-r--r-- | src/Var.vala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Var.vala b/src/Var.vala index 1437ede..eb44637 100644 --- a/src/Var.vala +++ b/src/Var.vala @@ -20,10 +20,18 @@ namespace Eva { } protected bool do_match(Term o, Gee.Map<string, Term> vars, Gee.Map<string, string> aliases) { + if(name == "_") { + return true; + } + string key = alias(name, aliases); if(o is Var) { Var v = o as Var; + if(v.name == "_") { + return true; + } + string vkey = alias(v.name, aliases); if(key == vkey) |