cloudformation-plus-plus: cfn template preprocessor
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

32 lines
615 B

<?php
declare(strict_types=1);
namespace App\Engine\Cfnpp\Expression;
/**
* Token representing a distinct part of an expression.
*
* @author Adam Pippin <hello@adampippin.ca>
*/
abstract class Token
{
/**
* Check whether the stream passed in contains a valid token of this
* type.
*
* @param string $stream
* @return bool
*/
abstract public static function isToken(string $stream): bool;
/**
* Consume a token from the stream.
*
* Only valid if isToken is true.
*
* @param string $stream
* @return Token
*/
abstract public static function getToken(string &$stream): Token;
}