• Cristian Maglie's avatar
    [skip-changelog] legacy: Arduino preprocess subroutine refactorization (part 3) (#2193) · 9ce2904b
    Cristian Maglie authored
    * Converted CTagsRunner into a function
    
    * Removed useless tasks from ctags_runner test
    
    * Simplified ctags_runner test
    
    * Removed some ctags related fields from builder context
    
    The last piece in RunCTags:
    
     	parser := &ctags.CTagsParser{}
     	parser.Parse(ctagsStdout, sketch.MainFile)
     	parser.FixCLinkageTagsDeclarations()
    
     	prototypes, line := parser.GeneratePrototypes()
     	if line != -1 {
     		prototypesLineWhereToInsert = line
     	}
    
    has been moved at the beginning of PrototypesAdder.
    RunCTags now returns the output of ctags instead of `prototypes` and `line`.
    This also allows to remove the context variables that keeps those
    information.
    
    * Simplified RunCTags / factored test subroutine
    
    * Removed DebugPreprocessor from builder ctx
    
    * Added executils.RunAndCaptureOutput
    
    * Moved RunCTags out of legacy package
    9ce2904b
process.go 6.52 KB