[njs] Fixed typos.
Dmitry Volyntsev
xeioex at nginx.com
Wed Dec 21 02:53:10 UTC 2022
details: https://hg.nginx.org/njs/rev/5fc0aa4a4e72
branches:
changeset: 2016:5fc0aa4a4e72
user: Jérémy Lal <kapouer at melix.org>
date: Thu Dec 15 13:04:46 2022 +0100
description:
Fixed typos.
diffstat:
src/njs_disassembler.c | 4 ++--
src/njs_generator.c | 4 ++--
src/njs_lexer.c | 6 +++---
src/njs_lexer.h | 4 ++--
src/njs_object.c | 2 +-
src/njs_parser.c | 14 +++++++-------
src/njs_vmcode.c | 4 ++--
src/njs_vmcode.h | 2 +-
8 files changed, 20 insertions(+), 20 deletions(-)
diffs (184 lines):
diff -r c43261bad627 -r 5fc0aa4a4e72 src/njs_disassembler.c
--- a/src/njs_disassembler.c Mon Dec 12 22:00:23 2022 -0800
+++ b/src/njs_disassembler.c Thu Dec 15 13:04:46 2022 +0100
@@ -88,8 +88,8 @@ static njs_code_name_t code_names[] = {
{ NJS_VMCODE_ADDITION, sizeof(njs_vmcode_3addr_t),
njs_str("ADD ") },
- { NJS_VMCODE_SUBSTRACTION, sizeof(njs_vmcode_3addr_t),
- njs_str("SUBSTRACT ") },
+ { NJS_VMCODE_SUBTRACTION, sizeof(njs_vmcode_3addr_t),
+ njs_str("SUBTRACT ") },
{ NJS_VMCODE_MULTIPLICATION, sizeof(njs_vmcode_3addr_t),
njs_str("MULTIPLY ") },
{ NJS_VMCODE_EXPONENTIATION, sizeof(njs_vmcode_3addr_t),
diff -r c43261bad627 -r 5fc0aa4a4e72 src/njs_generator.c
--- a/src/njs_generator.c Mon Dec 12 22:00:23 2022 -0800
+++ b/src/njs_generator.c Thu Dec 15 13:04:46 2022 +0100
@@ -616,7 +616,7 @@ njs_generate(njs_vm_t *vm, njs_generator
case NJS_TOKEN_RIGHT_SHIFT_ASSIGNMENT:
case NJS_TOKEN_UNSIGNED_RIGHT_SHIFT_ASSIGNMENT:
case NJS_TOKEN_ADDITION_ASSIGNMENT:
- case NJS_TOKEN_SUBSTRACTION_ASSIGNMENT:
+ case NJS_TOKEN_SUBTRACTION_ASSIGNMENT:
case NJS_TOKEN_MULTIPLICATION_ASSIGNMENT:
case NJS_TOKEN_EXPONENTIATION_ASSIGNMENT:
case NJS_TOKEN_DIVISION_ASSIGNMENT:
@@ -639,7 +639,7 @@ njs_generate(njs_vm_t *vm, njs_generator
case NJS_TOKEN_RIGHT_SHIFT:
case NJS_TOKEN_UNSIGNED_RIGHT_SHIFT:
case NJS_TOKEN_ADDITION:
- case NJS_TOKEN_SUBSTRACTION:
+ case NJS_TOKEN_SUBTRACTION:
case NJS_TOKEN_MULTIPLICATION:
case NJS_TOKEN_EXPONENTIATION:
case NJS_TOKEN_DIVISION:
diff -r c43261bad627 -r 5fc0aa4a4e72 src/njs_lexer.c
--- a/src/njs_lexer.c Mon Dec 12 22:00:23 2022 -0800
+++ b/src/njs_lexer.c Thu Dec 15 13:04:46 2022 +0100
@@ -64,7 +64,7 @@ static const uint8_t njs_tokens[256] n
/* & ' */ NJS_TOKEN_BITWISE_AND, NJS_TOKEN_SINGLE_QUOTE,
/* ( ) */ NJS_TOKEN_OPEN_PARENTHESIS, NJS_TOKEN_CLOSE_PARENTHESIS,
/* * + */ NJS_TOKEN_MULTIPLICATION, NJS_TOKEN_ADDITION,
- /* , - */ NJS_TOKEN_COMMA, NJS_TOKEN_SUBSTRACTION,
+ /* , - */ NJS_TOKEN_COMMA, NJS_TOKEN_SUBTRACTION,
/* . / */ NJS_TOKEN_DOT, NJS_TOKEN_DIVISION,
/* 0 1 */ NJS_TOKEN_DIGIT, NJS_TOKEN_DIGIT,
@@ -196,7 +196,7 @@ static const njs_lexer_multi_t njs_addi
static const njs_lexer_multi_t njs_substraction_token[] = {
{ '-', NJS_TOKEN_DECREMENT, 0, NULL },
- { '=', NJS_TOKEN_SUBSTRACTION_ASSIGNMENT, 0, NULL },
+ { '=', NJS_TOKEN_SUBTRACTION_ASSIGNMENT, 0, NULL },
};
@@ -639,7 +639,7 @@ njs_lexer_make_token(njs_lexer_t *lexer,
njs_nitems(njs_addition_token));
break;
- case NJS_TOKEN_SUBSTRACTION:
+ case NJS_TOKEN_SUBTRACTION:
njs_lexer_multi(lexer, token, njs_substraction_token,
njs_nitems(njs_substraction_token));
break;
diff -r c43261bad627 -r 5fc0aa4a4e72 src/njs_lexer.h
--- a/src/njs_lexer.h Mon Dec 12 22:00:23 2022 -0800
+++ b/src/njs_lexer.h Thu Dec 15 13:04:46 2022 +0100
@@ -39,7 +39,7 @@ typedef enum {
NJS_TOKEN_ASSIGNMENT,
NJS_TOKEN_ARROW,
NJS_TOKEN_ADDITION_ASSIGNMENT,
- NJS_TOKEN_SUBSTRACTION_ASSIGNMENT,
+ NJS_TOKEN_SUBTRACTION_ASSIGNMENT,
NJS_TOKEN_MULTIPLICATION_ASSIGNMENT,
NJS_TOKEN_EXPONENTIATION_ASSIGNMENT,
NJS_TOKEN_DIVISION_ASSIGNMENT,
@@ -66,7 +66,7 @@ typedef enum {
NJS_TOKEN_ADDITION,
NJS_TOKEN_UNARY_PLUS,
- NJS_TOKEN_SUBSTRACTION,
+ NJS_TOKEN_SUBTRACTION,
NJS_TOKEN_UNARY_NEGATION,
NJS_TOKEN_MULTIPLICATION,
diff -r c43261bad627 -r 5fc0aa4a4e72 src/njs_object.c
--- a/src/njs_object.c Mon Dec 12 22:00:23 2022 -0800
+++ b/src/njs_object.c Thu Dec 15 13:04:46 2022 +0100
@@ -2098,7 +2098,7 @@ njs_object_prototype_create_constructor(
if (setval != NULL) {
if (!njs_is_object(value)) {
- njs_type_error(vm, "Cannot create propery \"constructor\" on %s",
+ njs_type_error(vm, "Cannot create property \"constructor\" on %s",
njs_type_string(value->type));
return NJS_ERROR;
}
diff -r c43261bad627 -r 5fc0aa4a4e72 src/njs_parser.c
--- a/src/njs_parser.c Mon Dec 12 22:00:23 2022 -0800
+++ b/src/njs_parser.c Thu Dec 15 13:04:46 2022 +0100
@@ -3438,7 +3438,7 @@ njs_parser_unary_expression(njs_parser_t
operation = NJS_VMCODE_UNARY_PLUS;
break;
- case NJS_TOKEN_SUBSTRACTION:
+ case NJS_TOKEN_SUBTRACTION:
type = NJS_TOKEN_UNARY_NEGATION;
operation = NJS_VMCODE_UNARY_NEGATION;
break;
@@ -3768,8 +3768,8 @@ njs_parser_additive_expression_match(njs
operation = NJS_VMCODE_ADDITION;
break;
- case NJS_TOKEN_SUBSTRACTION:
- operation = NJS_VMCODE_SUBSTRACTION;
+ case NJS_TOKEN_SUBTRACTION:
+ operation = NJS_VMCODE_SUBTRACTION;
break;
default:
@@ -4438,9 +4438,9 @@ njs_parser_assignment_operator(njs_parse
operation = NJS_VMCODE_ADDITION;
break;
- case NJS_TOKEN_SUBSTRACTION_ASSIGNMENT:
+ case NJS_TOKEN_SUBTRACTION_ASSIGNMENT:
njs_thread_log_debug("JS: -=");
- operation = NJS_VMCODE_SUBSTRACTION;
+ operation = NJS_VMCODE_SUBTRACTION;
break;
case NJS_TOKEN_LEFT_SHIFT_ASSIGNMENT:
@@ -9337,7 +9337,7 @@ njs_parser_serialize_node(njs_chb_t *cha
njs_token_serialize(NJS_TOKEN_CONDITIONAL);
njs_token_serialize(NJS_TOKEN_ASSIGNMENT);
njs_token_serialize(NJS_TOKEN_ADDITION_ASSIGNMENT);
- njs_token_serialize(NJS_TOKEN_SUBSTRACTION_ASSIGNMENT);
+ njs_token_serialize(NJS_TOKEN_SUBTRACTION_ASSIGNMENT);
njs_token_serialize(NJS_TOKEN_MULTIPLICATION_ASSIGNMENT);
njs_token_serialize(NJS_TOKEN_EXPONENTIATION_ASSIGNMENT);
njs_token_serialize(NJS_TOKEN_DIVISION_ASSIGNMENT);
@@ -9356,7 +9356,7 @@ njs_parser_serialize_node(njs_chb_t *cha
njs_token_serialize(NJS_TOKEN_UNARY_PLUS);
njs_token_serialize(NJS_TOKEN_INCREMENT);
njs_token_serialize(NJS_TOKEN_POST_INCREMENT);
- njs_token_serialize(NJS_TOKEN_SUBSTRACTION);
+ njs_token_serialize(NJS_TOKEN_SUBTRACTION);
njs_token_serialize(NJS_TOKEN_UNARY_NEGATION);
njs_token_serialize(NJS_TOKEN_DECREMENT);
njs_token_serialize(NJS_TOKEN_POST_DECREMENT);
diff -r c43261bad627 -r 5fc0aa4a4e72 src/njs_vmcode.c
--- a/src/njs_vmcode.c Mon Dec 12 22:00:23 2022 -0800
+++ b/src/njs_vmcode.c Thu Dec 15 13:04:46 2022 +0100
@@ -195,7 +195,7 @@ njs_vmcode_interpreter(njs_vm_t *vm, u_c
NJS_GOTO_ROW(NJS_VMCODE_ADDITION),
NJS_GOTO_ROW(NJS_VMCODE_EQUAL),
NJS_GOTO_ROW(NJS_VMCODE_NOT_EQUAL),
- NJS_GOTO_ROW(NJS_VMCODE_SUBSTRACTION),
+ NJS_GOTO_ROW(NJS_VMCODE_SUBTRACTION),
NJS_GOTO_ROW(NJS_VMCODE_MULTIPLICATION),
NJS_GOTO_ROW(NJS_VMCODE_EXPONENTIATION),
NJS_GOTO_ROW(NJS_VMCODE_DIVISION),
@@ -712,7 +712,7 @@ NEXT_LBL;
njs_vmcode_operand(vm, vmcode->operand1, retval); \
pc += sizeof(njs_vmcode_3addr_t)
- CASE (NJS_VMCODE_SUBSTRACTION):
+ CASE (NJS_VMCODE_SUBTRACTION):
njs_vmcode_debug_opcode();
njs_vmcode_operand(vm, vmcode->operand3, value2);
diff -r c43261bad627 -r 5fc0aa4a4e72 src/njs_vmcode.h
--- a/src/njs_vmcode.h Mon Dec 12 22:00:23 2022 -0800
+++ b/src/njs_vmcode.h Thu Dec 15 13:04:46 2022 +0100
@@ -81,7 +81,7 @@ enum {
NJS_VMCODE_ADDITION,
NJS_VMCODE_EQUAL,
NJS_VMCODE_NOT_EQUAL,
- NJS_VMCODE_SUBSTRACTION,
+ NJS_VMCODE_SUBTRACTION,
NJS_VMCODE_MULTIPLICATION,
NJS_VMCODE_EXPONENTIATION,
NJS_VMCODE_DIVISION,
More information about the nginx-devel
mailing list