Две литеральные строковые константы не могут стоять подряд
This commit is contained in:
parent
f789d4b2f1
commit
da91abdad4
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "4";
|
||||
public const string Build = "2";
|
||||
public const string Revision = "1787";
|
||||
public const string Revision = "1790";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%COREVERSION%=2
|
||||
%REVISION%=1787
|
||||
%MINOR%=4
|
||||
%REVISION%=1790
|
||||
%COREVERSION%=2
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
//
|
||||
// This CSharp output file generated by Gardens Point LEX
|
||||
// Version: 1.1.3.301
|
||||
// Machine: IVAN-PC
|
||||
// DateTime: 27.08.2018 21:05:56
|
||||
// UserName: Ivan
|
||||
// Machine: DESKTOP-A6LT9RI
|
||||
// DateTime: 16.09.2018 5:06:05
|
||||
// UserName: ?????????
|
||||
// GPLEX input file <ABCPascal.lex>
|
||||
// GPLEX frame file <embedded resource>
|
||||
//
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
%type <stn> typed_const_list1 typed_const_list optional_expr_list elem_list optional_expr_list_with_bracket expr_list const_elem_list1 const_func_expr_list case_label_list const_elem_list optional_const_func_expr_list elem_list1
|
||||
%type <stn> enumeration_id expr_l1_list
|
||||
%type <stn> enumeration_id_list
|
||||
%type <ex> const_simple_expr term simple_term typed_const typed_const_plus typed_var_init_expression expr expr_with_func_decl_lambda const_expr elem range_expr const_elem array_const factor relop_expr expr_dq expr_l1 simple_expr range_term range_factor
|
||||
%type <ex> const_simple_expr term simple_term typed_const typed_const_plus typed_var_init_expression expr expr_with_func_decl_lambda const_expr elem range_expr const_elem array_const factor relop_expr expr_dq expr_l1 expr_l1_func_decl_lambda simple_expr range_term range_factor
|
||||
%type <ex> external_directive_ident init_const_expr case_label variable var_reference /*optional_write_expr*/ optional_read_expr simple_expr_or_nothing var_question_point
|
||||
%type <ob> for_cycle_type
|
||||
%type <ex> format_expr
|
||||
|
|
@ -2360,13 +2360,13 @@ inclass_proc_func_decl_noclass
|
|||
{
|
||||
$$ = new procedure_definition($1 as procedure_header, $2 as proc_block, @$);
|
||||
}
|
||||
| tkFunction func_name fp_list tkColon fptype optional_method_modificators1 tkAssign expr_l1 tkSemiColon
|
||||
| tkFunction func_name fp_list tkColon fptype optional_method_modificators1 tkAssign expr_l1_func_decl_lambda tkSemiColon
|
||||
{
|
||||
$$ = SyntaxTreeBuilder.BuildShortFuncDefinition($3 as formal_parameters, $6 as procedure_attributes_list, $2 as method_name, $5 as type_definition, $8, @1.Merge(@6));
|
||||
if (parsertools.build_tree_for_formatter)
|
||||
$$ = new short_func_definition($$ as procedure_definition);
|
||||
}
|
||||
| tkFunction func_name fp_list optional_method_modificators1 tkAssign expr_l1 tkSemiColon
|
||||
| tkFunction func_name fp_list optional_method_modificators1 tkAssign expr_l1_func_decl_lambda tkSemiColon
|
||||
{
|
||||
$$ = SyntaxTreeBuilder.BuildShortFuncDefinition($3 as formal_parameters, $4 as procedure_attributes_list, $2 as method_name, null, $6, @1.Merge(@4));
|
||||
if (parsertools.build_tree_for_formatter)
|
||||
|
|
@ -3122,6 +3122,13 @@ expr_l1
|
|||
| question_expr
|
||||
{ $$ = $1; }
|
||||
;
|
||||
|
||||
expr_l1_func_decl_lambda
|
||||
: expr_l1
|
||||
{ $$ = $1; }
|
||||
| func_decl_lambda
|
||||
{ $$ = $1; }
|
||||
;
|
||||
|
||||
expr_dq
|
||||
: relop_expr
|
||||
|
|
@ -3804,7 +3811,10 @@ literal_list
|
|||
}
|
||||
| literal_list one_literal
|
||||
{
|
||||
$$ = ($1 as literal_const_line).Add($2 as literal, @$);
|
||||
var line = $1 as literal_const_line;
|
||||
if (line.literals.Last() is string_const && $2 is string_const)
|
||||
parsertools.AddErrorFromResource("TWO_STRING_LITERALS_IN_SUCCESSION",@2);
|
||||
$$ = line.Add($2 as literal, @$);
|
||||
}
|
||||
;
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -212,6 +212,8 @@ script=
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.4.2.1787'
|
||||
!define VERSION '3.4.2.1790'
|
||||
|
|
|
|||
|
|
@ -7772,7 +7772,7 @@ end;
|
|||
|
||||
function Trim(s: string): string;
|
||||
begin
|
||||
Result := s.Trim;
|
||||
Result := s.Trim(' ');
|
||||
end;
|
||||
|
||||
function TrimLeft(s: string): string;
|
||||
|
|
@ -10344,13 +10344,13 @@ end;
|
|||
/// Преобразует строку в массив целых
|
||||
function ToIntegers(Self: string): array of integer; extensionmethod;
|
||||
begin
|
||||
Result := Self.ToWords().Select(s -> StrToInt(s)).ToArray();
|
||||
Result := Self.ToWords().ConvertAll(s -> StrToInt(s));
|
||||
end;
|
||||
|
||||
/// Преобразует строку в массив вещественных
|
||||
function ToReals(Self: string): array of real; extensionmethod;
|
||||
begin
|
||||
Result := Self.ToWords().Select(s -> StrToFloat(s)).ToArray();
|
||||
Result := Self.ToWords().ConvertAll(s -> StrToFloat(s));
|
||||
end;
|
||||
|
||||
/// Возвращает инверсию строки
|
||||
|
|
|
|||
3
TestSuite/errors/err0267.pas
Normal file
3
TestSuite/errors/err0267.pas
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
begin
|
||||
var s := 'sfgj' 'ery';
|
||||
end.
|
||||
|
|
@ -66,3 +66,4 @@ DOT_QUECTION_IN_SHORT_FUN=Выражение с ?. не может фигури
|
|||
BAD_INT2=Слишком маленькое целое
|
||||
INVALID_INTERFACE_MEMBER=Члены интерфейса не могут иметь определение
|
||||
EXTENDED_INDEXED_PROPERTIES=Индексные свойства не могут быть расширенными
|
||||
TWO_STRING_LITERALS_IN_SUCCESSION=Две литеральные строковые константы не могут стоять подряд
|
||||
|
|
|
|||
Loading…
Reference in a new issue