Skip to content

Commit 000909b

Browse files
committed
Replace references of “scanner” to “processor”.
1 parent fcef283 commit 000909b

2 files changed

Lines changed: 190 additions & 190 deletions

File tree

src/wp-includes/class-wp-block-processor.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ public function __construct( string $source_text ) {
616616
* continue;
617617
* }
618618
*
619-
* $seen_block_types[ $scanner->get_block_type() ] = true;
619+
* $seen_block_types[ $processor->get_block_type() ] = true;
620620
* }
621621
*
622622
* @since 6.9.0
@@ -1411,9 +1411,9 @@ public function has_closing_flag(): bool {
14111411
*
14121412
* Example:
14131413
*
1414-
* $is_core_paragraph = $scanner->is_block_type( 'paragraph' );
1415-
* $is_core_paragraph = $scanner->is_block_type( 'core/paragraph' );
1416-
* $is_formula = $scanner->is_block_type( 'math-block/formula' );
1414+
* $is_core_paragraph = $processor->is_block_type( 'paragraph' );
1415+
* $is_core_paragraph = $processor->is_block_type( 'core/paragraph' );
1416+
* $is_formula = $processor->is_block_type( 'math-block/formula' );
14171417
*
14181418
* @param string $block_type Block type name for the desired block.
14191419
* E.g. "paragraph", "core/paragraph", "math-blocks/formula".
@@ -1582,7 +1582,7 @@ public function opens_block( string ...$block_type ): bool {
15821582
*
15831583
* @see self::is_non_whitespace_html()
15841584
*
1585-
* @return bool Whether the scanner is matched on an HTML span.
1585+
* @return bool Whether the processor is matched on an HTML span.
15861586
*/
15871587
public function is_html(): bool {
15881588
return self::HTML_SPAN === $this->state;
@@ -1868,8 +1868,8 @@ public function allocate_and_return_parsed_attributes(): ?array {
18681868
* $processor = new WP_Block_Processor( '<!-- wp:void /-->' );
18691869
* null === $processor->get_span();
18701870
*
1871-
* $scanner->next_delimiter();
1872-
* WP_HTML_Span( 0, 17 ) === $scanner->get_span();
1871+
* $processor->next_delimiter();
1872+
* WP_HTML_Span( 0, 17 ) === $processor->get_span();
18731873
*
18741874
* @since 6.9.0
18751875
*
@@ -1921,31 +1921,31 @@ public function get_span(): ?WP_HTML_Span {
19211921
const VOID = 'void';
19221922

19231923
/**
1924-
* Indicates that the scanner is ready to start parsing but hasn’t yet begun.
1924+
* Indicates that the processor is ready to start parsing but hasn’t yet begun.
19251925
*
19261926
* @see self::$state
19271927
*
19281928
* @since 6.9.0}
19291929
*/
1930-
const READY = 'scanner-ready';
1930+
const READY = 'processor-ready';
19311931

19321932
/**
1933-
* Indicates that the scanner is matched on an explicit block delimiter.
1933+
* Indicates that the processor is matched on an explicit block delimiter.
19341934
*
19351935
* @see self::$state
19361936
*
19371937
* @since 6.9.0
19381938
*/
1939-
const MATCHED = 'scanner-matched';
1939+
const MATCHED = 'processor-matched';
19401940

19411941
/**
1942-
* Indicates that the scanner is matched on the opening of an implicit freeform delimiter.
1942+
* Indicates that the processor is matched on the opening of an implicit freeform delimiter.
19431943
*
19441944
* @see self::$state
19451945
*
19461946
* @since 6.9.0
19471947
*/
1948-
const HTML_SPAN = 'scanner-html-span';
1948+
const HTML_SPAN = 'processor-html-span';
19491949

19501950
/**
19511951
* Indicates that the parser started parsing a block comment delimiter, but
@@ -1958,11 +1958,11 @@ public function get_span(): ?WP_HTML_Span {
19581958
const INCOMPLETE_INPUT = 'incomplete-input';
19591959

19601960
/**
1961-
* Indicates that the scanner has finished parsing and has nothing left to scan.
1961+
* Indicates that the processor has finished parsing and has nothing left to scan.
19621962
*
19631963
* @see self::$state
19641964
*
19651965
* @since 6.9.0
19661966
*/
1967-
const COMPLETE = 'scanner-complete';
1967+
const COMPLETE = 'processor-complete';
19681968
}

0 commit comments

Comments
 (0)