From dd460c6ca5436b6babb7d3d367da07d977372d33 Mon Sep 17 00:00:00 2001 From: miks1965 Date: Sat, 21 May 2016 14:46:52 +0300 Subject: [PATCH] bug fix #161 --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 2 +- PascalABCNET.axml | 222 ++++++++++++++++++ ReleaseGenerators/PascalABCNETConsoleZIP.bat | 2 +- ReleaseGenerators/PascalABCNETMonoZIP.bat | 2 +- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- .../CompilationSamples/readln_int_string.pas | 7 + .../TreeConversion/syntax_tree_visitor.cs | 3 +- .../Project/ICSharpCode.SharpDevelop.csproj | 16 +- bin/Lib/PABCRtl.dll | Bin 505856 -> 505856 bytes 10 files changed, 240 insertions(+), 18 deletions(-) create mode 100644 TestSuite/CompilationSamples/readln_int_string.pas diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 32c3bf567..3d6c4dae9 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "1"; public const string Build = "0"; - public const string Revision = "1241"; + public const string Revision = "1243"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index ef786605d..2f34a026a 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %COREVERSION%=0 -%REVISION%=1241 +%REVISION%=1243 %MINOR%=1 %MAJOR%=3 diff --git a/PascalABCNET.axml b/PascalABCNET.axml index 7b2f28db3..7d10fda84 100644 --- a/PascalABCNET.axml +++ b/PascalABCNET.axml @@ -524,6 +524,228 @@ + + + + \codecompletion\domconverter.cs + if (pattern != null || pattern != "") + + public SymInfo [ ] GetTypeByPattern ( string pattern , int line , int col , bool all_names , int nest_level ) + public class DomConverter + namespace CodeCompletion + + + + + + \visualplugins\languageconverter\source\textformatter.cs + _word.Replace(specSymbol, ""); + + public string FormatWordWithKeyWord ( string _word , object _node ) + public class TextFormatter + namespace Converter + + + + + + \visualpascalabcnet\formsdesignerbinding\dependecies\src\main\base\project\src\services\refactoringservice\refactoringservice.cs + result.OrderBy(node => node.Content.FullyQualifiedName); + + static IEnumerable < ITreeNode < IClass > > FindDerivedClassesTree ( IClass baseClass , IEnumerable < IProjectContent > projectContents , HashSet < IClass > seenClasses ) + public static class RefactoringService + namespace ICSharpCode . SharpDevelop . Refactoring + + + + + + + + \treeconverter\treeconversion\syntax_tree_visitor.cs + if (_pascal_set_constant.values != null && _pascal_set_constant.values != null) + + public override void visit ( SyntaxTree . pascal_set_constant _pascal_set_constant ) + public class syntax_tree_visitor : SyntaxTree . AbstractVisitor + namespace PascalABCCompiler . TreeConverter + + + + + + \visualpascalabcnet\workbench\runnermanagerhandlers.cs + if (File.Exists(pdbFileName) && File.Exists(pdbFileName)) + + void WaitCallback_DeleteEXEAndPDB ( object state ) + public partial class WorkbenchRunService : VisualPascalABCPlugins . IWorkbenchRunService + namespace VisualPascalABC + + + + + + \visualpascalabcnet\formsdesignerbinding\dependecies\src\main\base\project\src\editor\codecompletion\nrefactoryinsightwindowhandler.cs + Вот здесь то место, где не учитывается один вариант открывающих скобок +Вместо одного из openBracketToken нужно написать openBracesToken + if (token.Kind == openParensToken || token.Kind == openBracketToken || token.Kind == openBracketToken) { + + public void InitializeOpenedInsightWindow ( ITextEditor editor , IInsightWindow insightWindow ) + public class NRefactoryInsightWindowHandler : IInsightWindowHandler + namespace ICSharpCode . SharpDevelop . Editor . CodeCompletion + + + + + + + + + + \treeconverter\systemlib\static_executors.cs + if (value >= int.MinValue && value <= int.MaxValue) + + private static int check_int_overflow ( location loc , int value ) + public static class static_executors + namespace PascalABCCompiler . SystemLibrary + + + + + + \treeconverter\systemlib\static_executors.cs + if (value >= long.MinValue && value <= long.MaxValue) + + private static long check_long_overflow ( location loc , long value ) + public static class static_executors + namespace PascalABCCompiler . SystemLibrary + + + + + + \NETGenerator\NETGenerator.cs + if (pos <= 255) il.Emit(OpCodes.Starg_S, pos); + + private void ConvertInc ( IExpressionNode e ) + public class ILConverter : AbstractVisitor + namespace PascalABCCompiler . NETGenerator + + + + + + \NETGenerator\NETGenerator.cs + if (pos <= 255) il.Emit(OpCodes.Starg_S, pos); + + private void ConvertDec ( IExpressionNode e ) + public class ILConverter : AbstractVisitor + namespace PascalABCCompiler . NETGenerator + + + + + + \NETGenerator\NETGenerator.cs + if (pos <= 255) il.Emit(OpCodes.Ldarga_S, pos); + + private void AddrOfParameterNode ( ICommonParameterReferenceNode value ) + public class ILConverter : AbstractVisitor + namespace PascalABCCompiler . NETGenerator + + + + + + + + \codecompletion\findreferences.cs + Двумя строчками ниже +(Здесь сказывается недостаток моего инструмента - если в методе есть две одинаковые строчки - переход осуществляется только на первую, а надо на вторую) + if (ret_tn != null) + + public override void visit ( indexer _indexer ) + public class ReferenceFinder : AbstractVisitor + namespace CodeCompletion + + + + + + \parsertools\syntaxtreevisitors\syntaxtreecomparer.cs + 597 и 631 строки в текущей версии + else if (left is int64_const) + + public void CompareInternal ( expression left , expression right ) + public class SyntaxTreeComparer + namespace PascalABCCompiler . SyntaxTree + + + + + + \parsertools\syntaxtreevisitors\syntaxtreecomparer.cs + 1599 +1611 +1615 строки + else if (left is case_node) + + public void CompareInternal ( statement left , statement right ) + public class SyntaxTreeComparer + namespace PascalABCCompiler . SyntaxTree + + + + + + + + + + \TreeConverter\TreeConversion\syntax_tree_visitor.cs + expression_node bfcint = make_read_call(si, _method_call.parameters, subloc2); + + internal void visit_method_call ( SyntaxTree . method_call _method_call ) + public class syntax_tree_visitor : SyntaxTree . AbstractVisitor + namespace PascalABCCompiler . TreeConverter + + + + + + \TreeConverter\TreeConversion\syntax_tree_visitor.cs + + private expression_node make_read_call ( SymbolInfo si , SyntaxTree . expression_list parameters , location loc ) + public class syntax_tree_visitor : SyntaxTree . AbstractVisitor + namespace PascalABCCompiler . TreeConverter + + + + + + \TreeConverter\TreeConversion\syntax_tree_visitor.cs + Это - непонятное место из-за которого происходит ошибка + readln_string_file = true; + + private expression_node make_read_call ( SymbolInfo si , SyntaxTree . expression_list parameters , location loc ) + public class syntax_tree_visitor : SyntaxTree . AbstractVisitor + namespace PascalABCCompiler . TreeConverter + + + + + + \TreeConverter\TreeConversion\syntax_tree_visitor.cs + if (!readln_string_file) + + private expression_node make_read_call ( SymbolInfo si , SyntaxTree . expression_list parameters , location loc ) + public class syntax_tree_visitor : SyntaxTree . AbstractVisitor + namespace PascalABCCompiler . TreeConverter + + + + + + \ No newline at end of file diff --git a/ReleaseGenerators/PascalABCNETConsoleZIP.bat b/ReleaseGenerators/PascalABCNETConsoleZIP.bat index 6705266b8..506007313 100644 --- a/ReleaseGenerators/PascalABCNETConsoleZIP.bat +++ b/ReleaseGenerators/PascalABCNETConsoleZIP.bat @@ -1,6 +1,6 @@ cd ..\bin del ..\Release\PACNETConsole.zip -..\utils\pkzipc\pkzipc.exe -add ..\Release\PABCNETC.zip pabcnetc.exe pabcnetcclear.exe Compiler.dll CompilerTools.dll Errors.dll Localization.dll NETGenerator.dll ParserTools.dll ICSharpCode.NRefactory.dll SemanticTree.dll SyntaxTree.dll TreeConverter.dll OptimizerConversion.dll PascalABCParser.dll licence.txt PascalABCNET.chm System.Threading.dll +..\utils\pkzipc\pkzipc.exe -add ..\Release\PABCNETC.zip pabcnetc.exe pabcnetcclear.exe Compiler.dll CompilerTools.dll Errors.dll Localization.dll NETGenerator.dll ParserTools.dll ICSharpCode.NRefactory.dll SemanticTree.dll SyntaxTree.dll TreeConverter.dll OptimizerConversion.dll PascalABCParser.dll licence.txt PascalABCNET.chm System.Threading.dll SyntaxTreeConverters.dll ..\utils\pkzipc\pkzipc.exe -add -nozip -dir ..\Release\PABCNETC.zip Lib\*.pcu ..\utils\pkzipc\pkzipc.exe -add -nozip -dir ..\Release\PABCNETC.zip Lng\*.dat ..\utils\pkzipc\pkzipc.exe -add -nozip -dir ..\Release\PABCNETC.zip Lng\*.LanguageName diff --git a/ReleaseGenerators/PascalABCNETMonoZIP.bat b/ReleaseGenerators/PascalABCNETMonoZIP.bat index 6f801248c..4a9fe67d8 100644 --- a/ReleaseGenerators/PascalABCNETMonoZIP.bat +++ b/ReleaseGenerators/PascalABCNETMonoZIP.bat @@ -1,6 +1,6 @@ cd ..\bin del ..\Release\PascalABCNETMono.zip -..\utils\pkzipc\pkzipc.exe -add ..\Release\PascalABCNETMono.zip PascalABCNETMono.exe pabcnetc.exe pabcnetc PascalABCNET Compiler.dll CompilerTools.dll Errors.dll Localization.dll NETGenerator.dll ParserTools.dll ICSharpCode.NRefactory.dll SemanticTree.dll SyntaxTree.dll TreeConverter.dll OptimizerConversion.dll PascalABCParser.dll licence.txt PascalABCNET.chm System.Threading.dll PluginsSupport.dll InternalErrorReport.dll ICSharpCode.TextEditor.dll ICSharpCode.SharpZipLib.dll CodeCompletion.dll Debugger.Core.dll Mono.Debugger.Soft.dll Mono.Debugging.dll Mono.Debugging.Soft.dll NETXP.Controls.dll NETXP.Controls.Bars.dll NETXP.Library.dll NETXP.Win32.dll WeifenLuo.WinFormsUI.Docking.dll template.pct +..\utils\pkzipc\pkzipc.exe -add ..\Release\PascalABCNETMono.zip PascalABCNETMono.exe pabcnetc.exe pabcnetc PascalABCNET Compiler.dll CompilerTools.dll Errors.dll Localization.dll NETGenerator.dll ParserTools.dll SyntaxTreeConverters.dll ICSharpCode.NRefactory.dll SemanticTree.dll SyntaxTree.dll TreeConverter.dll OptimizerConversion.dll PascalABCParser.dll licence.txt PascalABCNET.chm System.Threading.dll PluginsSupport.dll InternalErrorReport.dll ICSharpCode.TextEditor.dll ICSharpCode.SharpZipLib.dll CodeCompletion.dll Debugger.Core.dll Mono.Debugger.Soft.dll Mono.Debugging.dll Mono.Debugging.Soft.dll NETXP.Controls.dll NETXP.Controls.Bars.dll NETXP.Library.dll NETXP.Win32.dll WeifenLuo.WinFormsUI.Docking.dll template.pct ..\utils\pkzipc\pkzipc.exe -add -nozip -dir ..\Release\PascalABCNETMono.zip Lib\*.pcu ..\utils\pkzipc\pkzipc.exe -add -nozip -dir ..\Release\PascalABCNETMono.zip Highlighting\*.xshd ..\utils\pkzipc\pkzipc.exe -add -nozip -dir ..\Release\PascalABCNETMono.zip Ico\*.ico diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 8fab64a2d..393dbda08 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.1.0.1241' +!define VERSION '3.1.0.1243' diff --git a/TestSuite/CompilationSamples/readln_int_string.pas b/TestSuite/CompilationSamples/readln_int_string.pas new file mode 100644 index 000000000..6ed1b00eb --- /dev/null +++ b/TestSuite/CompilationSamples/readln_int_string.pas @@ -0,0 +1,7 @@ +var + x: real; + s: string; + +begin + readln(x, s); +end. \ No newline at end of file diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index 6d598b625..02b7d5be8 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -7994,7 +7994,8 @@ namespace PascalABCCompiler.TreeConverter } else { - if (SystemLibrary.SystemLibInitializer.readln_procedure.Equal(si) && parameters.expressions.Count == 2 && en.type == SystemLibrary.SystemLibrary.string_type) + /// SSM 21/05/16 - read_from_text_file && - bug fix #161 + if (read_from_text_file && SystemLibrary.SystemLibInitializer.readln_procedure.Equal(si) && parameters.expressions.Count == 2 && en.type == SystemLibrary.SystemLibrary.string_type) { fn = convertion_data_and_alghoritms.select_function(exl, SystemLibrary.SystemLibInitializer.readln_procedure.SymbolInfo, loc); readln_string_file = true; diff --git a/VisualPascalABCNET/FormsDesignerBinding/Dependecies/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj b/VisualPascalABCNET/FormsDesignerBinding/Dependecies/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj index 7148c6c18..9af2b3c63 100644 --- a/VisualPascalABCNET/FormsDesignerBinding/Dependecies/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj +++ b/VisualPascalABCNET/FormsDesignerBinding/Dependecies/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj @@ -537,12 +537,8 @@ - - UserControl - - - UserControl - + + @@ -586,9 +582,7 @@ Form - - Component - + @@ -782,9 +776,7 @@ BuildEvents.xaml - - Component - + diff --git a/bin/Lib/PABCRtl.dll b/bin/Lib/PABCRtl.dll index b70e874a17aaa1f303a6d91ea0c9ea2453f7a2e4..5ed93b2b4a72da23fc100b3caa0151dfa9fb3afa 100644 GIT binary patch delta 234 zcmVt+5v^y0=3!$>6m{|W+8wm^P*TFiWn}l zvTM^)9KQi4J$us!={%erZ4%}4Q-Z9Qtba($`a}XMF6z4dupGBn-U7_4Ja$EqZW~=Z z*744`1mml#lo#iioe7&+s2f$dO(c!pmTB4eCkP-D55?B(^51Z6?}n;5-j-si*q&mG z&{=uuF>cAF-kt$!heMhJheMhKheMhLw?mo+WoZx^9);*>v7AM>v;8cKTJ3SSxB~}- ku>&C@KbJqX2N@7Klx-L-Dx5%v9!zxPlP}P>Xtf8J0-vyKE&u=k delta 234 zcmV6m}fA3-iFOstmTF%D;1 zee=ia3{KGVJ?c8@Kivo^48G?I6*|{aGTFHVySb!g(*sy6MntXj`2(MT2Gbx0xM`Fw zWqWLynpD!>T`OeR+F)f97Jm}NO-+j5OH~W`3j0yKQ|-{Vfd;JCzzg9k>T~-6V1+N{ zCRyT^eHK~$aV7zbheMhJheMhKheMhLw?mo+WoZx?r;PiJ(oYV2N@8h7N|I;A3jW~e>IcwkXYomXtf8J0(P8gpa1{>