本文整理汇总了C#中PascalABCCompiler类的典型用法代码示例。如果您正苦于以下问题:C# PascalABCCompiler类的具体用法?C# PascalABCCompiler怎么用?C# PascalABCCompiler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PascalABCCompiler类属于命名空间,在下文中一共展示了PascalABCCompiler类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: TokenReadError
public TokenReadError(PascalABCCompiler.ParserTools.GPBParser parser)
: base(string.Format(ParserErrorsStringResources.Get("UNEXPECTED_SYMBOL{0}"), parser.LRParser.TokenText!="" ? parser.LRParser.TokenText : "(EOF)"),
parser.current_file_name,
parser.parsertools.GetTokenSourceContext(parser.LRParser),
(syntax_tree_node)parser.prev_node)
{
}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:7,代码来源:Errors.cs
示例2: ChangeCompilerState
private void ChangeCompilerState(ICompiler sender, PascalABCCompiler.CompilerState State, string FileName)
{
switch (State)
{
case CompilerState.CompilationFinished:
if (compiler.ErrorsList.Count > 0)
foreach (Errors.Error er in compiler.ErrorsList)
SendErrorOrWarning(er);
if (compiler.Warnings.Count > 0)
foreach (Errors.Error er in compiler.Warnings)
SendErrorOrWarning(er);
SendCommand(ConsoleCompilerConstants.LinesCompiled, compiler.LinesCompiled.ToString());
SendCommand(ConsoleCompilerConstants.BeginOffest, compiler.BeginOffset.ToString());
SendCommand(ConsoleCompilerConstants.VarBeginOffest, compiler.VarBeginOffset.ToString());
SendCommand(ConsoleCompilerConstants.CompilerOptionsOutputType, ((int)compiler.CompilerOptions.OutputFileType).ToString());
sendWorkingSet();
break;
case CompilerState.Ready:
if(compilerReloading)
sendWorkingSet();
break;
}
if (FileName != null)
SendCommand(ConsoleCompilerConstants.CommandStartNumber + (int)State, FileName);
else
SendCommand(ConsoleCompilerConstants.CommandStartNumber + (int)State);
}
开发者ID:CSRedRat,项目名称:pascalabcnet,代码行数:27,代码来源:CommandConsoleCompiler.cs
示例3: VisualEnvironmentCompiler
public VisualEnvironmentCompiler(InvokeDegegate beginInvoke,
SetFlagDelegate setCompilingButtonsEnabled, SetFlagDelegate setCompilingDebugEnabled, SetTextDelegate setStateText,
SetTextDelegate addTextToCompilerMessages, ToolStripMenuItem pluginsMenuItem,
ToolStrip pluginsToolStrip, ExecuteSourceLocationActionDelegate ExecuteSLAction,
ExecuteVisualEnvironmentCompilerActionDelegate ExecuteVECAction,
PascalABCCompiler.Errors.ErrorsStrategyManager ErrorsManager, RunManager RunnerManager, DebugHelper DebugHelper,UserOptions UserOptions,System.Collections.Hashtable StandartDirectories,
Dictionary<string, CodeFileDocumentControl> OpenDocuments, IWorkbench workbench)
{
this.StandartDirectories = StandartDirectories;
this.ErrorsManager = ErrorsManager;
this.ChangeVisualEnvironmentState += new ChangeVisualEnvironmentStateDelegate(onChangeVisualEnvironmentState);
SetCompilingButtonsEnabled = setCompilingButtonsEnabled;
SetDebugButtonsEnabled = setCompilingDebugEnabled;
SetStateText = setStateText;
AddTextToCompilerMessages = addTextToCompilerMessages;
this.beginInvoke = beginInvoke;
this.ExecuteSLAction=ExecuteSLAction;
this.ExecuteVECAction = ExecuteVECAction;
PluginsMenuItem = pluginsMenuItem;
PluginsToolStrip = pluginsToolStrip;
PluginsController = new VisualPascalABCPlugins.PluginsController(this, PluginsMenuItem, PluginsToolStrip, workbench);
this.RunnerManager = RunnerManager;
this.DebugHelper = DebugHelper;
DebugHelper.Starting += new DebugHelper.DebugHelperActionDelegate(DebugHelper_Starting);
DebugHelper.Exited += new DebugHelper.DebugHelperActionDelegate(DebugHelper_Exited);
RunnerManager.Starting += new RunManager.RunnerManagerActionDelegate(RunnerManager_Starting);
RunnerManager.Exited += new RunManager.RunnerManagerActionDelegate(RunnerManager_Exited);
this.CodeCompletionParserController = WorkbenchServiceFactory.CodeCompletionParserController;
this.CodeCompletionParserController.visualEnvironmentCompiler = this;
this.UserOptions = UserOptions;
this.OpenDocuments = OpenDocuments;
}
开发者ID:Slav76,项目名称:pascalabcnet,代码行数:32,代码来源:VisualEnvironmentCompiler.cs
示例4: Compiler_OnChangeCompilerState
void Compiler_OnChangeCompilerState(PascalABCCompiler.ICompiler sender, PascalABCCompiler.CompilerState State, string FileName)
{
if (!Visible) return;
switch (State)
{
case PascalABCCompiler.CompilerState.CompilationStarting:
BuildButtonsEnabled = syntaxTreeSelectComboBox.Enabled = false;
this.Refresh();
break;
case PascalABCCompiler.CompilerState.CompilationFinished:
Errors.Clear();
if (VisualEnvironmentCompiler.Compiler.ErrorsList.Count > 0)
{
SyntaxError er;
for (int i = 0; i < VisualEnvironmentCompiler.Compiler.ErrorsList.Count; i++)
{
er = VisualEnvironmentCompiler.Compiler.ErrorsList[i] as SyntaxError;
if (er!=null && er.bad_node != null)
Errors[er.bad_node] = i;
}
}
UpdateSelectList();
ShowTree();
BuildButtonsEnabled = true;
break;
}
}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:27,代码来源:SyntaxTreeVisualisatorForm.cs
示例5: SetOptions
public void SetOptions(PascalABCCompiler.IProjectInfo prj)
{
prj.DeleteEXE = this.cbDeleteExe.Checked;
prj.DeletePDB = this.cbDeletePdb.Checked;
prj.IncludeDebugInfo = this.cbDebugRelease.SelectedIndex == 0;
prj.OutputDirectory = this.tbOutputDirectory.Text;
prj.CommandLineArguments = this.tbRunArguments.Text;
if (!string.IsNullOrEmpty(this.tbAppIcon.Text))
{
/*if (File.Exists(this.tbAppIcon.Text))
prj.AppIcon = this.tbAppIcon.Text;
else*/
prj.AppIcon = Path.Combine(prj.ProjectDirectory, this.tbAppIcon.Text);
}
else
prj.AppIcon = null;
prj.MajorVersion = Convert.ToInt32(this.tbMajor.Text);
prj.MinorVersion = Convert.ToInt32(this.tbMinor.Text);
prj.BuildVersion = Convert.ToInt32(this.tbBuild.Text);
prj.RevisionVersion = Convert.ToInt32(this.tbRevision.Text);
prj.GenerateXMLDoc = this.cbGenerateXmlDoc.Checked;
prj.Product = this.tbProduct.Text;
prj.Company = this.tbCompany.Text;
prj.Trademark = this.tbTradeMark.Text;
prj.Copyright = this.tbCopyright.Text;
}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:26,代码来源:ProjectProperties.cs
示例6: LoadOptions
public void LoadOptions(PascalABCCompiler.IProjectInfo prj)
{
proj = prj;
this.cbDeleteExe.Checked = prj.DeleteEXE;
this.cbDeletePdb.Checked = prj.DeletePDB;
if (prj.IncludeDebugInfo)
this.cbDebugRelease.SelectedIndex = 0;
else
this.cbDebugRelease.SelectedIndex = 1;
this.tbOutputDirectory.Text = prj.OutputDirectory;
this.tbRunArguments.Text = prj.CommandLineArguments;
if (!string.IsNullOrEmpty(prj.AppIcon))
{
this.tbAppIcon.Text = prepare_icon_name(prj.AppIcon);
}
this.tbMajor.Text = Convert.ToString(prj.MajorVersion);
this.tbMinor.Text = Convert.ToString(prj.MinorVersion);
this.tbBuild.Text = Convert.ToString(prj.BuildVersion);
this.tbRevision.Text = Convert.ToString(prj.RevisionVersion);
this.cbGenerateXmlDoc.Checked = prj.GenerateXMLDoc;
this.tbProduct.Text = prj.Product;
this.tbCompany.Text = prj.Company;
this.tbTradeMark.Text = prj.Trademark;
this.tbCopyright.Text = prj.Copyright;
}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:25,代码来源:ProjectProperties.cs
示例7: GPB_PABCPreprocessor2
public GPB_PABCPreprocessor2(Stream stream, PascalABCCompiler.Preprocessor2.Preprocessor2 prepr1)
: base(stream)
{
pascal_parsertools = new pascalabc_parsertools();
parsertools = pascal_parsertools;
prepr = prepr1;
}
开发者ID:CSRedRat,项目名称:pascalabcnet,代码行数:8,代码来源:PABCPreprocessor2_lrparser.cs
示例8: Update
public override void Update(PascalABCCompiler.Parsers.SymInfo si)
{
ICompletionData val=null;
if (dict.TryGetValue(si,out val))
{
val.Description = si.description;
}
}
开发者ID:PascalABC-CompilerLaboratory,项目名称:pascalabcnet,代码行数:8,代码来源:CodeCompletionHelpers.cs
示例9: ConvertSourceContextToSourceLocation
public static SourceLocation ConvertSourceContextToSourceLocation(string FileName, PascalABCCompiler.SyntaxTree.SourceContext sc)
{
if (sc.FileName != null)
FileName = sc.FileName;
return new SourceLocation(FileName,
sc.begin_position.line_num, sc.begin_position.column_num,
sc.end_position.line_num, sc.end_position.column_num);
}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:8,代码来源:Tools.cs
示例10: GetName
/// <summary>
/// Получение имен после точки
/// </summary>
public SymInfo[] GetName(expression expr, string str, int line, int col, PascalABCCompiler.Parsers.KeywordKind keyword, ref SymScope root)
{
if (visitor.cur_scope == null) return null;
if (col + 1 > str.Length)
col -= str.Length;
SymScope si = visitor.FindScopeByLocation(line + 1, col + 1);//stv.cur_scope;
if (si == null)
{
si = visitor.FindScopeByLocation(line, col + 1);
if (si == null)
return null;
}
SetCurrentUsedAssemblies();
ExpressionVisitor ev = new ExpressionVisitor(expr, si, visitor);
si = ev.GetScopeOfExpression(true, false);
root = si;
if (si is ElementScope) root = (si as ElementScope).sc;
else if (si is ProcScope) root = (si as ProcScope).return_type;
if (si != null)
{
if (!(si is TypeScope) && !(si is NamespaceScope))
{
SymInfo[] syms = si.GetNamesAsInObject(ev);
SymInfo[] ext_syms = null;
if (si is ElementScope)
ext_syms = visitor.cur_scope.GetSymInfosForExtensionMethods((si as ElementScope).sc as TypeScope);
List<SymInfo> lst = new List<SymInfo>();
lst.AddRange(syms);
if (ext_syms != null)
lst.AddRange(ext_syms);
RestoreCurrentUsedAssemblies();
List<SymInfo> lst_to_remove = new List<SymInfo>();
foreach (SymInfo si2 in lst)
if (si2.name.StartsWith("operator"))
lst_to_remove.Add(si2);
foreach (SymInfo si2 in lst_to_remove)
lst.Remove(si2);
return lst.ToArray();
}
else
{
if (si is TypeScope)
{
RestoreCurrentUsedAssemblies();
return (si as TypeScope).GetNames(ev, keyword, false);
}
else
{
if (ev.entry_scope.InUsesRange(line + 1, col + 1))
keyword = PascalABCCompiler.Parsers.KeywordKind.Uses;
RestoreCurrentUsedAssemblies();
return (si as NamespaceScope).GetNames(ev, keyword);
}
}
}
RestoreCurrentUsedAssemblies();
return null;
}
开发者ID:Slav76,项目名称:pascalabcnet,代码行数:61,代码来源:DomConverter.cs
示例11: ShowCompletionWindow
public static PABCNETCodeCompletionWindow ShowCompletionWindow(Form parent, TextEditorControl control, string fileName, ICompletionDataProvider completionDataProvider, char firstChar, bool visibleKeyPressed, bool is_by_dot,PascalABCCompiler.Parsers.KeywordKind keyw)
{
ICompletionData[] completionData = (completionDataProvider as VisualPascalABC.CodeCompletionProvider).GenerateCompletionDataWithKeyword(fileName, control.ActiveTextAreaControl.TextArea, firstChar, keyw);
if (completionData == null || completionData.Length == 0) {
return null;
}
PABCNETCodeCompletionWindow codeCompletionWindow = new PABCNETCodeCompletionWindow(completionDataProvider, completionData, parent, control, visibleKeyPressed, is_by_dot);
codeCompletionWindow.ShowCompletionWindow();
return codeCompletionWindow;
}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:10,代码来源:CodeCompletionWindow.cs
示例12: RestoreSymbols
static void RestoreSymbols(SymbolInfo si, PascalABCCompiler.TreeRealization.wrapped_definition_node wdn, string name)
{
if (wdn.is_synonim)
si.sym_info = wdn.PCUReader.CreateTypeSynonim(wdn.offset, name);
else
if (si.scope is ClassScope)
si.sym_info = wdn.PCUReader.CreateInterfaceInClassMember(wdn.offset, name);
else
si.sym_info = wdn.PCUReader.CreateImplementationMember(wdn.offset, false);
}
开发者ID:Slav76,项目名称:pascalabcnet,代码行数:10,代码来源:SymbolTable.cs
示例13: ShowCompletionWindowWithFirstChar
public static PABCNETCodeCompletionWindow ShowCompletionWindowWithFirstChar(Form parent, TextEditorControl control, string fileName, ICompletionDataProvider completionDataProvider, char firstChar, PascalABCCompiler.Parsers.KeywordKind keyw)
{
ICompletionData[] completionData = (completionDataProvider as VisualPascalABC.CodeCompletionProvider).GenerateCompletionDataByFirstChar(fileName, control.ActiveTextAreaControl.TextArea, firstChar, keyw);
if (completionData == null || completionData.Length == 0) {
return null;
}
(completionDataProvider as VisualPascalABC.CodeCompletionProvider).preSelection = firstChar.ToString();
PABCNETCodeCompletionWindow codeCompletionWindow = new PABCNETCodeCompletionWindow(completionDataProvider, completionData, parent, control, true, false);
codeCompletionWindow.ShowCompletionWindow();
return codeCompletionWindow;
}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:11,代码来源:CodeCompletionWindow.cs
示例14: SymbolsViwer
public SymbolsViwer(ListView listView, ImageList imageList, bool showInThread, VisualPascalABCPlugins.InvokeDegegate beginInvoke,
PascalABCCompiler.SourceFilesProviderDelegate sourceFilesProvider, VisualEnvironmentCompiler.ExecuteSourceLocationActionDelegate ExecuteSourceLocationAction)
{
this.listView = listView;
this.imageList = imageList;
this.showInThread = showInThread;
this.beginInvoke = beginInvoke;
this.sourceFilesProvider = sourceFilesProvider;
this.ExecuteSourceLocationAction = ExecuteSourceLocationAction;
listView.MouseDoubleClick += new MouseEventHandler(listView_MouseDoubleClick);
}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:11,代码来源:SymbolsViwer.cs
示例15: NetScope
public NetScope(PascalABCCompiler.TreeRealization.using_namespace_list unar,System.Reflection.Assembly assembly,
SymbolTable.TreeConverterSymbolTable tcst) : base(tcst)
{
_unar=unar;
_assembly=assembly;
UnitTypes = NetHelper.init_namespaces(assembly);
if (UnitTypes.Count > 0)
{
entry_type = GetEntryType();
}
_tcst=tcst;
}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:13,代码来源:NetHelper.cs
示例16: Compiler_OnChangeCompilerState
void Compiler_OnChangeCompilerState(PascalABCCompiler.ICompiler sender, PascalABCCompiler.CompilerState State, string FileName)
{
switch (State)
{
case PascalABCCompiler.CompilerState.CompilationStarting:
BuildButtonsEnabled = false;
this.Refresh();
break;
case PascalABCCompiler.CompilerState.CompilationFinished:
ShowTree();
BuildButtonsEnabled = true;
break;
}
}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:14,代码来源:SemanicTreeVisualisatorForm.cs
示例17: CompileInterface
//TODO: Исправить коллекцию модулей.
public PascalABCCompiler.TreeRealization.common_unit_node CompileInterface(SyntaxTree.compilation_unit SyntaxUnit,
PascalABCCompiler.TreeRealization.unit_node_list UsedUnits, List<Errors.Error> ErrorsList, List<Errors.CompilerWarning> WarningsList, PascalABCCompiler.Errors.SyntaxError parser_error,
System.Collections.Hashtable bad_nodes, TreeRealization.using_namespace_list namespaces, Dictionary<SyntaxTree.syntax_tree_node,string> docs, bool debug, bool debugging)
{
//convertion_data_and_alghoritms.__i = 0;
stv.parser_error=parser_error;
stv.bad_nodes_in_syntax_tree = bad_nodes;
stv.referenced_units=UsedUnits;
//stv.comp_units=UsedUnits;
//stv.visit(SyntaxUnit
//stv.interface_using_list = namespaces;
stv.using_list.clear();
stv.interface_using_list.clear();
stv.using_list.AddRange(namespaces);
stv.current_document = new TreeRealization.document(SyntaxUnit.file_name);
stv.ErrorsList = ErrorsList;
stv.WarningsList = WarningsList;
stv.SymbolTable.CaseSensitive = SemanticRules.SymbolTableCaseSensitive;
stv.docs = docs;
stv.debug = debug;
stv.debugging = debugging;
SystemLibrary.SystemLibrary.syn_visitor = stv;
SetSemanticRules(SyntaxUnit);
foreach (SyntaxTree.compiler_directive cd in SyntaxUnit.compiler_directives)
cd.visit(stv);
stv.DirectivesToNodesLinks = CompilerDirectivesToSyntaxTreeNodesLinker.BuildLinks(SyntaxUnit, ErrorsList); //MikhailoMMX добавил передачу списка ошибок (02.10.10)
SyntaxUnit.visit(stv);
/*SyntaxTree.program_module pmod=SyntaxUnit as SyntaxTree.program_module;
if (pmod!=null)
{
stv.visit(pmod);
}
else
{
SyntaxTree.unit_module umod=SyntaxUnit as SyntaxTree.unit_module;
if (umod==null)
{
throw new PascalABCCompiler.TreeConverter.CompilerInternalError("Undefined module type (not program and not unit)");
}
stv.visit(umod);
}*/
//stv.visit(SyntaxUnit);
//if (ErrorsList.Count>0) throw ErrorsList[0];
return stv.compiled_unit;
}
开发者ID:Slav76,项目名称:pascalabcnet,代码行数:50,代码来源:SyntaxTreeToSemanticTreeConverter.cs
示例18: UnexpectedToken
public UnexpectedToken(PascalABCCompiler.ParserTools.GPBParser parser)
: base("", parser.current_file_name, parser.parsertools.GetTokenSourceContext(parser.LRParser), (syntax_tree_node)parser.prev_node)
{
List<GoldParser.Symbol> Symbols = parser.parsertools.GetPrioritySymbols(parser.LRParser.GetExpectedTokens());
if (Symbols.Count == 1)
{
string OneSybmolText = "ONE_" + Symbols[0].Name.ToUpper();
string LocOneSybmolText = StringResources.Get(OneSybmolText);
if (LocOneSybmolText != OneSybmolText)
{
_message = string.Format(LocOneSybmolText);
return;
}
}
_message = string.Format(StringResources.Get("EXPECTED{0}"), PascalABCCompiler.FormatTools.ObjectsToString(parser.parsertools.SymbolsToStrings(Symbols.ToArray()), ","));
}
开发者ID:CSRedRat,项目名称:pascalabcnet,代码行数:16,代码来源:Errors.cs
示例19: Compiler_OnChangeCompilerState
void Compiler_OnChangeCompilerState(PascalABCCompiler.ICompiler sender, PascalABCCompiler.CompilerState State, string FileName)
{
States += State.ToString();
if (FileName != null)
States += " "+System.IO.Path.GetFileName(FileName);
States += Environment.NewLine;
switch (State)
{
case PascalABCCompiler.CompilerState.CompilationStarting:
FileNames.Clear();
States = "";
break;
case PascalABCCompiler.CompilerState.BeginCompileFile:
FileNames.Add(FileName);
break;
case PascalABCCompiler.CompilerState.ReadPCUFile:
FileNames.Add(FileName);
FileNames.Add(System.IO.Path.ChangeExtension(FileName,".pas"));
break;
case PascalABCCompiler.CompilerState.Ready:
foreach (PascalABCCompiler.Errors.Error error in VisualEnvironmentCompiler.Compiler.ErrorsList)
if (error is PascalABCCompiler.Errors.CompilerInternalError)
{
ReportText = DateTime.Now.ToString() + Environment.NewLine;
ReportText += GetInfo()+Environment.NewLine;
ReportText += "StatesList: " + Environment.NewLine + States + Environment.NewLine;
for (int i = 0; i < VisualEnvironmentCompiler.Compiler.ErrorsList.Count; i++)
ReportText += string.Format("Error[{0}]: {1}{2}", i, VisualEnvironmentCompiler.Compiler.ErrorsList[i].ToString(),Environment.NewLine);
CompilerInternalErrorReport.ErrorMessage.Text = error.ToString();
CompilerInternalErrorReport.ReportText = ReportText;
CompilerInternalErrorReport.FileNames = FileNames;
CompilerInternalErrorReport.VEC = VisualEnvironmentCompiler;
CompilerInternalErrorReport.ShowDialog();
return;
}
break;
}
}
开发者ID:CSRedRat,项目名称:pascalabcnet,代码行数:38,代码来源:InternalErrorReportPlugin.cs
示例20: Compile
//kompilacija proekta
public string Compile(PascalABCCompiler.IProjectInfo project, bool rebuild, string RuntimeServicesModule, bool ForRun, bool RunWithEnvironment)
{
ProjectService.SaveProject();
Workbench.WidgetController.CompilingButtonsEnabled = false;
Workbench.CompilerConsoleWindow.ClearConsole();
CompilerOptions1.SourceFileName = project.Path;
CompilerOptions1.OutputDirectory = project.OutputDirectory;
CompilerOptions1.ProjectCompiled = true;
if (project.ProjectType == PascalABCCompiler.ProjectType.WindowsApp)
CompilerOptions1.OutputFileType = PascalABCCompiler.CompilerOptions.OutputType.WindowsApplication;
ErrorsList.Clear();
CompilerOptions1.Rebuild = rebuild;
CompilerOptions1.Locale = PascalABCCompiler.StringResourcesLanguage.CurrentTwoLetterISO;
CompilerOptions1.UseDllForSystemUnits = false;
CompilerOptions1.RunWithEnvironment = RunWithEnvironment;
bool savePCU = Workbench.VisualEnvironmentCompiler.Compiler.InternalDebug.PCUGenerate;
if (Path.GetDirectoryName(CompilerOptions1.SourceFileName).ToLower() == ((string)WorkbenchStorage.StandartDirectories[Constants.LibSourceDirectoryIdent]).ToLower())
Workbench.VisualEnvironmentCompiler.Compiler.InternalDebug.PCUGenerate = false;
if (RuntimeServicesModule != null)
CompilerOptions1.StandartModules.Add(new PascalABCCompiler.CompilerOptions.StandartModule(RuntimeServicesModule, PascalABCCompiler.CompilerOptions.StandartModuleAddMethod.RightToMain, PascalABCCompiler.SyntaxTree.LanguageId.C | PascalABCCompiler.SyntaxTree.LanguageId.PascalABCNET | PascalABCCompiler.SyntaxTree.LanguageId.CommonLanguage));
string ofn = Workbench.VisualEnvironmentCompiler.Compile(CompilerOptions1);
Workbench.VisualEnvironmentCompiler.Compiler.InternalDebug.PCUGenerate = savePCU;
if (RuntimeServicesModule != null)
CompilerOptions1.RemoveStandartModuleAtIndex(CompilerOptions1.StandartModules.Count - 1);
if (Workbench.VisualEnvironmentCompiler.Compiler.ErrorsList.Count != 0 || Workbench.VisualEnvironmentCompiler.Compiler.Warnings.Count != 0)
{
List<PascalABCCompiler.Errors.Error> ErrorsAndWarnings = new List<PascalABCCompiler.Errors.Error>();
List<PascalABCCompiler.Errors.Error> Errors = Workbench.ErrorsManager.CreateErrorsList(Workbench.VisualEnvironmentCompiler.Compiler.ErrorsList);
AddErrors(ErrorsAndWarnings, Errors);
//if (!ForRun)
AddWarnings(ErrorsAndWarnings, Workbench.VisualEnvironmentCompiler.Compiler.Warnings);
Workbench.ErrorsListWindow.ShowErrorsSync(ErrorsAndWarnings, Errors.Count != 0 || (Workbench.VisualEnvironmentCompiler.Compiler.Warnings.Count != 0 && !ForRun));
}
return ofn;
}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:39,代码来源:BuildService.cs
注:本文中的PascalABCCompiler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论