csharp

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Language = core.SourceLanguage{
	ID:     core.LanguageId("csharp"),
	Sitter: csharp.GetLanguage(),
	CapabilityFinder: lang.NewCapabilityFinder("comment", lang.CompositePreprocessor(
		lang.RegexpRemovePreprocessor(`//\s*`),
		func(comment string) string {

			if !strings.HasPrefix(comment, "/*") {
				return comment
			}

			comment = comment[1 : len(comment)-1]
			comment = multilineCommentMarginRegexp.ReplaceAllString(comment, "")

			return comment
		},
	)),
	TurnIntoComment: lang.MakeLineCommenter("// "),
}

Functions

func DoQuery

func DoQuery(c *sitter.Node, q string) query.NextMatchFunc

DoQuery is a thin wrapper around `query.Exec` to use C# as the Language.

func NewFile

func NewFile(path string, content io.Reader) (f *core.SourceFile, err error)

Types

type CSharpPlugins

type CSharpPlugins struct {
	Plugins []core.Plugin
}

func NewCSharpPlugins

func NewCSharpPlugins(cfg *config.Application, runtime Runtime) *CSharpPlugins

func (CSharpPlugins) Name

func (c CSharpPlugins) Name() string

func (CSharpPlugins) Transform

func (c CSharpPlugins) Transform(result *core.CompilationResult, deps *core.Dependencies) error

type Runtime

type Runtime interface {
}

Directories

Path Synopsis
aws

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL