Roslyn un compiltaore per amico

768 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Roslyn un compiltaore per amico

  1. 1. Roslynun compilatore per amico
  2. 2. about meAlessandro Melchiorialessandro@codiceplastico.com@amelchiori
  3. 3. why? ?
  4. 4. compiler pipeline symbols parser binder IL emitter metadata import
  5. 5. compiler API binding and syntax tree API symbol API flow analysys emit API API
  6. 6. edit and continue go to definition extract method signature help quick info renamelanguage service find all references completion list object browser navigate to outlining colorizer formatter
  7. 7. API layers compilers scripting workspace services
  8. 8. working with syntaxSyntax tree: represent the lexical and syntactic structure of source codeo full fidelityo round-trippable backo ImmutableSyntax node: represent syntactic constructs (such as declarations, statements,clauses and expression)Syntax tokens: represent the smallest syntactic fragment of the codeSyntax trivia: represent the parts of the source text that are largely insignificantfor normal understanding of the code (such as whitespace, comments andprocessor directives)SpansKindsErrors
  9. 9. working with semanticCompilation: represent everything needed to compile C# or VB.Net program(including all the assembly references, compiler options and source files)Symbol: represents a distinct element declared by source code or imported froman assembly as metadataSemantic model: represents all the semantic information for a single source file

×