Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed Focus parser.

  • Loading branch information...
commit fb74eff12059c28b682c7322abc8bf61b190f613 1 parent 1f9076d
@tzlaine authored
Showing with 14 additions and 14 deletions.
  1. +9 −9 ConditionParser1.cpp
  2. +5 −5 test/condition_parser_1
View
18 ConditionParser1.cpp
@@ -130,19 +130,19 @@ namespace {
;
species
- = (
- tok.Species_
- >> parse::label(Name_name) >> string_ref_vec [ _val = new_<Condition::Species>(_1) ]
+ = tok.Species_
+ >> (
+ parse::label(Name_name) >> string_ref_vec [ _val = new_<Condition::Species>(_1) ]
+ | eps [ _val = new_<Condition::Species>() ]
)
- | tok.Species_ [ _val = new_<Condition::Species>() ]
;
focus_type
- = (
- tok.FocusType_
- >> parse::label(Type_name) >> string_ref_vec [ _val = new_<Condition::FocusType>(_1) ]
+ = tok.Focus_
+ >> (
+ parse::label(Type_name) >> string_ref_vec [ _val = new_<Condition::FocusType>(_1) ]
+ | eps [ _val = new_<Condition::FocusType>(std::vector<const ValueRef::ValueRefBase<std::string>*>()) ]
)
- | tok.FocusType_ [ _val = new_<Condition::FocusType>(std::vector<const ValueRef::ValueRefBase<std::string>*>()) ]
;
planet_type
@@ -248,7 +248,7 @@ namespace {
homeworld.name("Homeworld");
building.name("Building");
species.name("Species");
- focus_type.name("FocusType");
+ focus_type.name("Focus");
planet_type.name("PlanetType");
planet_size.name("PlanetSize");
planet_environment.name("PlanetEnvironment");
View
10 test/condition_parser_1
@@ -26,11 +26,11 @@ Species "Species Foo"
Species Name = [ "Species Foo" "Species Bar" ]
Species [ "Species Foo" "Species Bar" ]
Species
-FocusType Type = "Focus Foo"
-FocusType "Focus Foo"
-FocusType Type = [ "Focus Foo" "Focus Bar" ]
-FocusType [ "Focus Foo" "Focus Bar" ]
-FocusType
+Focus Type = "Focus Foo"
+Focus "Focus Foo"
+Focus Type = [ "Focus Foo" "Focus Bar" ]
+Focus [ "Focus Foo" "Focus Bar" ]
+Focus
Planet Type = Swamp
Planet Swamp
Planet Type = [ Swamp Toxic ]
Please sign in to comment.
Something went wrong with that request. Please try again.