---
name: "Compiler::Lexer::Token"
section: "3pm"
platform: "linux"
package: "libcompiler-lexer-perl"
version: "0.23-3+b4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Compiler::Lexer::Token"
---

# Compiler::Lexer::Token(3pm)

Token object for Compiler::Lexer

## NAME

Compiler::Lexer::Token - Token object for Compiler::Lexer

## SYNOPSIS

Compiler::Lexer::Token includes the following members.

- stype

  constant of Compiler::Lexer::SyntaxType

- type

  constant of Compiler::Lexer::TokenType

- kind

  constant of Compiler::Lexer::Kind

- name

  name of Compiler::Lexer::TokenType

- data

  raw data

- has\_warnings

  flag of whether unknown keyword or not

## METHODS

support simple get/set accessors like Class::Accessor::Fast

example:

```
  my $type = $token->type;                            # get accessor
  $token->type(Compiler::Lexer::TokenType::T_RegExp); # set accessor
```

## AUTHOR

Masaaki Goshima (goccy) \<goccy(at)cpan.org\>

## LICENSE AND COPYRIGHT

Copyright (c) 2013, Masaaki Goshima (goccy). All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
