_Core/Lang/Plugins/Parser/RunPlugin.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ComLib.Lang;
namespace ComLib.Lang.Extensions
{
/* *************************************************************************
<doc:example>
// Run plugin provides alternate way to call a function for fluid syntax.
// Notes:
// 1. The keyword "function" can be aliased with the word "step"
// 2. The name of a function can be in quotes with spaces.
// This is a function with 0 parameters so parentheses are not required
step Cleanup
{
// do something here.
}
// This is a function with string for name and 0 parameters so parentheses are not required
step 'Clean up'
{
// do something here.
}
// Example 1: Call function normally
Cleanup();
// Example 2: Call function using Run keyword
run Cleanup();
// Example 3: Call function using run without parenthesis for function name.
run Cleanup;
// Example 4: Call function with spaces in name using run with quotes for function name.
run 'Clean up';
// Example 5: Call function with spaces using run and keyword.
run step 'Clean up';
</doc:example>
***************************************************************************/
/// <summary>
/// Combinator for function calls using "run" keyword first.
/// </summary>
public class RunPlugin : ExprPlugin
{
private static string[] _tokens = new string[] { "run", "Run" };
/// <summary>
/// Initialize
/// </summary>
public RunPlugin()
后面还有 81 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
