Click here to Skip to main content
14,489,038 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: I read that the average compiler takes 30 man-years to develop Pin
Super Lloyd1-Dec-19 13:31
MemberSuper Lloyd1-Dec-19 13:31 
GeneralRe: I read that the average compiler takes 30 man-years to develop Pin
honey the codewitch1-Dec-19 13:33
mvahoney the codewitch1-Dec-19 13:33 
GeneralRe: I read that the average compiler takes 30 man-years to develop Pin
Member 79891222-Dec-19 1:07
MemberMember 79891222-Dec-19 1:07 
GeneralRe: I read that the average compiler takes 30 man-years to develop Pin
Jörgen Andersson1-Dec-19 20:53
professionalJörgen Andersson1-Dec-19 20:53 
GeneralRe: I read that the average compiler takes 30 man-years to develop Pin
honey the codewitch1-Dec-19 20:55
mvahoney the codewitch1-Dec-19 20:55 
GeneralI feel kind of bad about this Pin
honey the codewitch1-Dec-19 4:43
mvahoney the codewitch1-Dec-19 4:43 
GeneralRe: I feel kind of bad about this Pin
PIEBALDconsult1-Dec-19 5:41
professionalPIEBALDconsult1-Dec-19 5:41 
GeneralRe: I feel kind of bad about this Pin
honey the codewitch1-Dec-19 5:45
mvahoney the codewitch1-Dec-19 5:45 
Heh. Nope. In fact, this object gets populated with different information every time it lands on an element of code

var cls = CD.Class("Foo", true);
var m = CD.Method("Bar", MemberAttributes.Public, CD.Param(typeof(string), "baz"));
var slang = SlangParser.ParseExpression("baz + \"world\"");
CodeStatement anchor1 = null;
m.Statements.Add(anchor1=(CD.Call(CD.TypeRef(typeof(Console)), "Writeline", slang)));
cls.Members.Add(m);
var ns = new CodeNamespace();
ns.Types.Add(cls);
var ccu = new CodeCompileUnit();
ccu.Namespaces.Add(ns);
var res = new CodeDomResolver();
res.CompileUnits.Add(ccu);
res.Refresh();
var scope = res.GetScope(anchor1);


That is operating on this object model of abstract code:
public class Foo {
    public virtual void Bar(string baz) {
        // anchor1 is set to this statement
        System.Console.Writeline((baz + "world"));
    }
}


From here we get all of the information about what variables, fields, properties, methods, events, and arguments we have access to, returned from GetScope({statement})

I use this to perform analysis and patch up the code tree.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

GeneralRe: I feel kind of bad about this Pin
BillWoodruff1-Dec-19 5:48
mveBillWoodruff1-Dec-19 5:48 
GeneralRe: I feel kind of bad about this Pin
Ravi Bhavnani1-Dec-19 10:31
professionalRavi Bhavnani1-Dec-19 10:31 
GeneralRe: I feel kind of bad about this Pin
honey the codewitch1-Dec-19 10:34
mvahoney the codewitch1-Dec-19 10:34 
GeneralRe: I feel kind of bad about this Pin
Super Lloyd1-Dec-19 13:31
MemberSuper Lloyd1-Dec-19 13:31 
GeneralRe: I feel kind of bad about this Pin
honey the codewitch1-Dec-19 13:43
mvahoney the codewitch1-Dec-19 13:43 
GeneralI've probably set the record for the amount of code I've written that nobody will use. Pin
honey the codewitch1-Dec-19 4:22
mvahoney the codewitch1-Dec-19 4:22 
GeneralRe: I've probably set the record for the amount of code I've written that nobody will use. Pin
RickZeeland1-Dec-19 4:32
mveRickZeeland1-Dec-19 4:32 
GeneralRe: I've probably set the record for the amount of code I've written that nobody will use. Pin
OriginalGriff1-Dec-19 4:34
mveOriginalGriff1-Dec-19 4:34 
GeneralRe: I've probably set the record for the amount of code I've written that nobody will use. Pin
honey the codewitch1-Dec-19 4:35
mvahoney the codewitch1-Dec-19 4:35 
GeneralRe: I've probably set the record for the amount of code I've written that nobody will use. Pin
OriginalGriff1-Dec-19 4:44
mveOriginalGriff1-Dec-19 4:44 
GeneralRe: I've probably set the record for the amount of code I've written that nobody will use. Pin
honey the codewitch1-Dec-19 4:45
mvahoney the codewitch1-Dec-19 4:45 
GeneralRe: I've probably set the record for the amount of code I've written that nobody will use. Pin
OriginalGriff1-Dec-19 4:48
mveOriginalGriff1-Dec-19 4:48 
GeneralRe: I've probably set the record for the amount of code I've written that nobody will use. Pin
OriginalGriff1-Dec-19 4:46
mveOriginalGriff1-Dec-19 4:46 
GeneralRe: I've probably set the record for the amount of code I've written that nobody will use. Pin
RickZeeland1-Dec-19 4:47
mveRickZeeland1-Dec-19 4:47 
GeneralRe: I've probably set the record for the amount of code I've written that nobody will use. Pin
Sander Rossel1-Dec-19 6:29
professionalSander Rossel1-Dec-19 6:29 
JokeRe: I've probably set the record for the amount of code I've written that nobody will use. Pin
honey the codewitch1-Dec-19 6:34
mvahoney the codewitch1-Dec-19 6:34 
GeneralRe: I've probably set the record for the amount of code I've written that nobody will use. Pin
#realJSOP1-Dec-19 8:19
mva#realJSOP1-Dec-19 8:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.