What is the ScriptDom? The ScriptDom is an api for taking t-sql scripts, converting them into an AST or taking an AST and generating t-sql.
What is an AST? Read this: https://en.wikipedia.org/wiki/Abstract_syntax_tree
Think about this:
select col from tablea
select col from tablea
select col /*from not_table*/ from tablea
select –not_col
col from tablea
and then something more complicated like:
select col from (select a as col from something /*else*/) a