clangparser

package
v0.0.0-...-24099d6 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package clangparser provides functionalities to understand clang-family command line flags.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cmdline []string) *args.Scanner

New returns arguments scanner for command line type.

Types

type State

type State struct {
	// contains filtered or unexported fields
}

State holds the state of clang flag parsing useful for understanding command inputs/outputs.

func (*State) Finalize

func (s *State) Finalize(f *flags.CommandFlags)

Finalize finalizes the passed CommandFlags based on the current State.

func (*State) HandleClangFlags

func (s *State) HandleClangFlags(nextRes *args.FlagResult, f *flags.CommandFlags, legacyBehavior bool) error

HandleClangFlags updates the given CommandFlags with the passed flag given the current ClangState.

func (*State) HandleClangFlagsFromScanner

func (s *State) HandleClangFlagsFromScanner(cmdFlags *flags.CommandFlags, scanner *args.Scanner, legacyBehavior bool) error

HandleClangFlagsFromScanner updates the provided CommandFlags from the next item from the provded scanner. This

Directories

Path Synopsis
Binary gen_clang_flags generates clang_flags.go from Options.td json output.
Binary gen_clang_flags generates clang_flags.go from Options.td json output.

Jump to

Keyboard shortcuts

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