// Copyright (C) 2023 WYATT GROUP
// Please see the AUTHORS file for details.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

enum TokenType { literal, argument, plural, gender, select }

class Token {
  Token(this.type, this.value);
  TokenType type;
  String value;
}

class Option {
  Option(this.name, this.value);
  String name;
  List<Token> value;
}

class Literal extends Token {
  Literal(String value) : super(TokenType.literal, value);
}

class Argument extends Token {
  Argument(String value) : super(TokenType.argument, value);
}

class Gender extends Token {
  Gender(String value, this.options) : super(TokenType.gender, value);
  List<Option> options;
}

class Plural extends Token {
  Plural(String value, this.options) : super(TokenType.plural, value);
  List<Option> options;
}

class Select extends Token {
  Select(String value, this.options) : super(TokenType.select, value);
  List<Option> options;
}
